mirror of
https://github.com/FliegendeWurst/tmux-thumbs.git
synced 2024-11-23 05:14:59 +00:00
Format code
This commit is contained in:
parent
7fd8709c64
commit
b6d0a3d530
10
src/state.rs
10
src/state.rs
@ -220,14 +220,18 @@ mod tests {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn match_paths() {
|
fn match_paths() {
|
||||||
let lines =
|
let lines = split(
|
||||||
split("Lorem /tmp/foo/bar_lol, lorem\n Lorem /var/log/boot-strap.log lorem ../log/kern.log lorem");
|
"Lorem /tmp/foo/bar_lol, lorem\n Lorem /var/log/boot-strap.log lorem ../log/kern.log lorem",
|
||||||
|
);
|
||||||
let custom = [].to_vec();
|
let custom = [].to_vec();
|
||||||
let results = State::new(&lines, "abcd", &custom).matches(false, false);
|
let results = State::new(&lines, "abcd", &custom).matches(false, false);
|
||||||
|
|
||||||
assert_eq!(results.len(), 3);
|
assert_eq!(results.len(), 3);
|
||||||
assert_eq!(results.get(0).unwrap().text.clone(), "/tmp/foo/bar_lol");
|
assert_eq!(results.get(0).unwrap().text.clone(), "/tmp/foo/bar_lol");
|
||||||
assert_eq!(results.get(1).unwrap().text.clone(), "/var/log/boot-strap.log");
|
assert_eq!(
|
||||||
|
results.get(1).unwrap().text.clone(),
|
||||||
|
"/var/log/boot-strap.log"
|
||||||
|
);
|
||||||
assert_eq!(results.get(2).unwrap().text.clone(), "../log/kern.log");
|
assert_eq!(results.get(2).unwrap().text.clone(), "../log/kern.log");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user