mirror of
https://github.com/lsd-rs/lsd
synced 2024-12-13 13:42:34 +00:00
Fix some flaky integration tests
This commit is contained in:
parent
79398d796d
commit
f1254a6b0c
1 changed files with 16 additions and 3 deletions
|
@ -421,6 +421,7 @@ fn test_bad_utf_8_extension() {
|
|||
|
||||
cmd()
|
||||
.arg(tmp.path())
|
||||
.arg("--ignore-config")
|
||||
.assert()
|
||||
.stdout(predicate::str::is_match("bad.extension\u{fffd}\u{fffd}\n$").unwrap());
|
||||
}
|
||||
|
@ -435,6 +436,7 @@ fn test_bad_utf_8_name() {
|
|||
|
||||
cmd()
|
||||
.arg(tmp.path())
|
||||
.arg("--ignore-config")
|
||||
.assert()
|
||||
.stdout(predicate::str::is_match("bad-name\u{fffd}\u{fffd}.ext\n$").unwrap());
|
||||
}
|
||||
|
@ -449,6 +451,7 @@ fn test_tree() {
|
|||
cmd()
|
||||
.arg(tmp.path())
|
||||
.arg("--tree")
|
||||
.arg("--ignore-config")
|
||||
.assert()
|
||||
.stdout(predicate::str::is_match("├── one\n└── one.d\n └── two\n$").unwrap());
|
||||
}
|
||||
|
@ -465,6 +468,7 @@ fn test_tree_all_not_show_self() {
|
|||
.arg(tmp.path())
|
||||
.arg("--tree")
|
||||
.arg("--all")
|
||||
.arg("--ignore-config")
|
||||
.assert()
|
||||
.stdout(
|
||||
predicate::str::is_match("├── one\n└── one.d\n ├── .hidden\n └── two\n$")
|
||||
|
@ -482,6 +486,7 @@ fn test_tree_show_edge_before_name() {
|
|||
.arg(tmp.path())
|
||||
.arg("--tree")
|
||||
.arg("--long")
|
||||
.arg("--ignore-config")
|
||||
.assert()
|
||||
.stdout(predicate::str::is_match("└── two\n$").unwrap());
|
||||
}
|
||||
|
@ -500,6 +505,7 @@ fn test_tree_d() {
|
|||
.arg(tmp.path())
|
||||
.arg("--tree")
|
||||
.arg("-d")
|
||||
.arg("--ignore-config")
|
||||
.assert()
|
||||
.stdout(predicate::str::is_match("├── one.d\n│ └── one.d\n└── two.d\n$").unwrap());
|
||||
}
|
||||
|
@ -513,9 +519,14 @@ fn test_tree_no_dereference() {
|
|||
let link = tmp.path().join("link");
|
||||
fs::symlink("one.d", &link).unwrap();
|
||||
|
||||
cmd().arg(tmp.path()).arg("--tree").assert().stdout(
|
||||
predicate::str::is_match("├── link ⇒ one.d\n└── one.d\n └── samplefile\n$").unwrap(),
|
||||
);
|
||||
cmd()
|
||||
.arg("--tree")
|
||||
.arg("--ignore-config")
|
||||
.arg(tmp.path())
|
||||
.assert()
|
||||
.stdout(
|
||||
predicate::str::is_match("├── link ⇒ one.d\n└── one.d\n └── samplefile\n$").unwrap(),
|
||||
);
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
|
@ -528,6 +539,7 @@ fn test_tree_dereference() {
|
|||
fs::symlink("one.d", &link).unwrap();
|
||||
|
||||
cmd()
|
||||
.arg("--ignore-config")
|
||||
.arg(tmp.path())
|
||||
.arg("--tree")
|
||||
.arg("-L")
|
||||
|
@ -678,6 +690,7 @@ fn test_all_directory() {
|
|||
cmd()
|
||||
.arg("-a")
|
||||
.arg("-d")
|
||||
.arg("--ignore-config")
|
||||
.arg(dir.path())
|
||||
.assert()
|
||||
.stdout(predicate::str::is_match(".").unwrap());
|
||||
|
|
Loading…
Reference in a new issue