mirror of
https://github.com/sharkdp/bat.git
synced 2026-10-28 08:05:55 +00:00
Fix integration tests on Windows
This commit is contained in:
1 parent
ad608014d9
commit
c8514543af
2 files changed
+37
-24
No files matched your search
@@ -1,6 +1,10 @@
|
|||||||
/target/
|
/target/
|
||||||
**/*.rs.bk
|
**/*.rs.bk
|
||||||
|
|
||||||
|
# Editors
|
||||||
|
.idea/
|
||||||
|
.vscode/
|
||||||
|
|
||||||
# Generated files
|
# Generated files
|
||||||
/assets/completions/_bat.ps1
|
/assets/completions/_bat.ps1
|
||||||
/assets/completions/bat.bash
|
/assets/completions/bat.bash
|
||||||
|
|||||||
+33
-24
@@ -1357,27 +1357,33 @@ fn disable_pager_if_pp_flag_comes_after_paging() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
#[serial]
|
||||||
fn enable_pager_if_disable_paging_flag_comes_before_paging() {
|
fn enable_pager_if_disable_paging_flag_comes_before_paging() {
|
||||||
bat()
|
mocked_pagers::with_mocked_versions_of_more_and_most_in_path(|| {
|
||||||
.env("PAGER", "echo pager-output")
|
bat()
|
||||||
.arg("-P")
|
.env("PAGER", mocked_pagers::from("echo pager-output"))
|
||||||
.arg("--paging=always")
|
.arg("-P")
|
||||||
.arg("test.txt")
|
.arg("--paging=always")
|
||||||
.assert()
|
.arg("test.txt")
|
||||||
.success()
|
.assert()
|
||||||
.stdout(predicate::eq("pager-output\n").normalize());
|
.success()
|
||||||
|
.stdout(predicate::str::contains("pager-output\n").normalize());
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
#[serial]
|
||||||
fn enable_pager_if_pp_flag_comes_before_paging() {
|
fn enable_pager_if_pp_flag_comes_before_paging() {
|
||||||
bat()
|
mocked_pagers::with_mocked_versions_of_more_and_most_in_path(|| {
|
||||||
.env("PAGER", "echo pager-output")
|
bat()
|
||||||
.arg("-pp")
|
.env("PAGER", mocked_pagers::from("echo pager-output"))
|
||||||
.arg("--paging=always")
|
.arg("-pp")
|
||||||
.arg("test.txt")
|
.arg("--paging=always")
|
||||||
.assert()
|
.arg("test.txt")
|
||||||
.success()
|
.assert()
|
||||||
.stdout(predicate::eq("pager-output\n").normalize());
|
.success()
|
||||||
|
.stdout(predicate::str::contains("pager-output\n").normalize());
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@@ -1394,15 +1400,18 @@ fn paging_does_not_override_simple_plain() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
#[serial]
|
||||||
fn simple_plain_does_not_override_paging() {
|
fn simple_plain_does_not_override_paging() {
|
||||||
bat()
|
mocked_pagers::with_mocked_versions_of_more_and_most_in_path(|| {
|
||||||
.env("PAGER", "echo pager-output")
|
bat()
|
||||||
.arg("--paging=always")
|
.env("PAGER", mocked_pagers::from("echo pager-output"))
|
||||||
.arg("--plain")
|
.arg("--paging=always")
|
||||||
.arg("test.txt")
|
.arg("--plain")
|
||||||
.assert()
|
.arg("test.txt")
|
||||||
.success()
|
.assert()
|
||||||
.stdout(predicate::eq("pager-output\n"));
|
.success()
|
||||||
|
.stdout(predicate::str::contains("pager-output\n").normalize());
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|||||||
Reference in new issue
Block a user