mirror of
https://github.com/sharkdp/bat.git
synced 2025-01-18 20:11:03 +00:00
Tests ~ echo
has portability issues; for CI, replace with printf
- using `echo` on 'windows' platforms requires process execution indirectly via the shell - `printf` is available on all GHA CI platforms - `printf` is *not* available on usual 'windows' platforms; so this is just temporizing, awaiting a true fix
This commit is contained in:
parent
9cc8e52512
commit
3a7743ffc5
2
tests/examples/bat.conf
vendored
2
tests/examples/bat.conf
vendored
@ -2,4 +2,4 @@
|
|||||||
--paging=always
|
--paging=always
|
||||||
|
|
||||||
# Output a dummy message for the integration test.
|
# Output a dummy message for the integration test.
|
||||||
--pager="echo dummy-pager-from-config"
|
--pager="printf dummy-pager-from-config"
|
||||||
|
@ -372,30 +372,30 @@ fn do_not_exit_directory() {
|
|||||||
#[test]
|
#[test]
|
||||||
fn pager_basic() {
|
fn pager_basic() {
|
||||||
bat()
|
bat()
|
||||||
.env("PAGER", "echo pager-output")
|
.env("PAGER", "printf pager-output")
|
||||||
.arg("--paging=always")
|
.arg("--paging=always")
|
||||||
.arg("test.txt")
|
.arg("test.txt")
|
||||||
.assert()
|
.assert()
|
||||||
.success()
|
.success()
|
||||||
.stdout("pager-output\n");
|
.stdout("pager-output");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn pager_overwrite() {
|
fn pager_overwrite() {
|
||||||
bat()
|
bat()
|
||||||
.env("PAGER", "echo other-pager")
|
.env("PAGER", "printf other-pager")
|
||||||
.env("BAT_PAGER", "echo pager-output")
|
.env("BAT_PAGER", "printf pager-output")
|
||||||
.arg("--paging=always")
|
.arg("--paging=always")
|
||||||
.arg("test.txt")
|
.arg("test.txt")
|
||||||
.assert()
|
.assert()
|
||||||
.success()
|
.success()
|
||||||
.stdout("pager-output\n");
|
.stdout("pager-output");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn pager_disable() {
|
fn pager_disable() {
|
||||||
bat()
|
bat()
|
||||||
.env("PAGER", "echo other-pager")
|
.env("PAGER", "printf other-pager")
|
||||||
.env("BAT_PAGER", "")
|
.env("BAT_PAGER", "")
|
||||||
.arg("--paging=always")
|
.arg("--paging=always")
|
||||||
.arg("test.txt")
|
.arg("test.txt")
|
||||||
@ -421,7 +421,7 @@ fn config_read_arguments_from_file() {
|
|||||||
.arg("test.txt")
|
.arg("test.txt")
|
||||||
.assert()
|
.assert()
|
||||||
.success()
|
.success()
|
||||||
.stdout("dummy-pager-from-config\n");
|
.stdout("dummy-pager-from-config");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user