History

Another test to validate components must not be empty

Sebastian Thiel committed 4 years ago

Commit b2c9af11 parent aa5d66f1 file · +8 −0Browse files

Unified · Split

git-refspec/tests/parse/invalid.rs+8−0
@@ -7,6 +7,14 @@ fn empty() { · 6 unmodified lines
7 assert!(matches!(try_parse("", Operation::Push).unwrap_err(), Error::Empty));7 assert!(matches!(try_parse("", Operation::Push).unwrap_err(), Error::Empty));
8}8}
9 9
10#[test]
11fn empty_component() {
12 assert!(matches!(
13 try_parse("refs/heads/test:refs/remotes//test", Operation::Fetch).unwrap_err(),
14 Error::ReferenceName(git_validate::refname::Error::RepeatedSlash)
15 ));
16}
17
10#[test]18#[test]
11fn complex_patterns_with_more_than_one_asterisk() {19fn complex_patterns_with_more_than_one_asterisk() {
12 for op in [Operation::Fetch, Operation::Push] {20 for op in [Operation::Fetch, Operation::Push] {