mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-11-22 20:15:11 +00:00
A note to my future self
It’s important to capture the current behaviour, even if it ends up being totally wrong.
This commit is contained in:
parent
108dc80944
commit
476299e21f
@ -74,6 +74,8 @@ where I: Iterator<Item=&'a str>
|
||||
let iter = iter.filter(|el| !el.is_empty());
|
||||
let iter = iter.filter(|el| !el.starts_with("#"));
|
||||
|
||||
// TODO: Figure out if this should trim whitespace or not
|
||||
|
||||
// Errors are currently being ignored... not a good look
|
||||
IgnorePatterns::parse_from_iter(iter).0
|
||||
}
|
||||
@ -114,6 +116,13 @@ mod test {
|
||||
assert_eq!(patterns, file_lines_to_patterns(stuff.into_iter()));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_some_whitespacey_lines() {
|
||||
let stuff = vec![ " *.mp3", " ", " a ", "README.md " ];
|
||||
let reals = vec![ " *.mp3", " ", " a ", "README.md " ];
|
||||
let (patterns, _) = IgnorePatterns::parse_from_iter(reals.into_iter());
|
||||
assert_eq!(patterns, file_lines_to_patterns(stuff.into_iter()));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user