Unified · Split
| @@ -7,6 +7,14 @@ fn empty() { · 6 unmodified lines | ||
| 7 | 7 | assert!(matches!(try_parse("", Operation::Push).unwrap_err(), Error::Empty)); |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | +#[test] | |
| 11 | +fn 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 | 18 | #[test] |
| 11 | 19 | fn complex_patterns_with_more_than_one_asterisk() { |
| 12 | 20 | for op in [Operation::Fetch, Operation::Push] { |