summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRoy Ivy III <rivy.dev@gmail.com>2020-05-26 21:08:24 -0500
committerDavid Peter <sharkdp@users.noreply.github.com>2020-06-03 09:13:47 +0200
commit3a7743ffc5ed7c770bd61bbf67ba1b52419dcfd1 (patch)
tree812355b59f6f3f28a44b831cc5c17121741a569f /tests
parent9cc8e52512f8950340e3044e9494f2136ddf2ae2 (diff)
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
Diffstat (limited to 'tests')
-rw-r--r--tests/examples/bat.conf2
-rw-r--r--tests/integration_tests.rs14
2 files changed, 8 insertions, 8 deletions
diff --git a/tests/examples/bat.conf b/tests/examples/bat.conf
index 614ab40d..6bb92c5c 100644
--- a/tests/examples/bat.conf
+++ b/tests/examples/bat.conf
@@ -2,4 +2,4 @@
--paging=always
# Output a dummy message for the integration test.
---pager="echo dummy-pager-from-config"
+--pager="printf dummy-pager-from-config"
diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs
index cd6cde5b..88f5b637 100644
--- a/tests/integration_tests.rs
+++ b/tests/integration_tests.rs
@@ -372,30 +372,30 @@ fn do_not_exit_directory() {
#[test]
fn pager_basic() {
bat()
- .env("PAGER", "echo pager-output")
+ .env("PAGER", "printf pager-output")
.arg("--paging=always")
.arg("test.txt")
.assert()
.success()
- .stdout("pager-output\n");
+ .stdout("pager-output");
}
#[test]
fn pager_overwrite() {
bat()
- .env("PAGER", "echo other-pager")
- .env("BAT_PAGER", "echo pager-output")
+ .env("PAGER", "printf other-pager")
+ .env("BAT_PAGER", "printf pager-output")
.arg("--paging=always")
.arg("test.txt")
.assert()
.success()
- .stdout("pager-output\n");
+ .stdout("pager-output");
}
#[test]
fn pager_disable() {
bat()
- .env("PAGER", "echo other-pager")
+ .env("PAGER", "printf other-pager")
.env("BAT_PAGER", "")
.arg("--paging=always")
.arg("test.txt")
@@ -421,7 +421,7 @@ fn config_read_arguments_from_file() {
.arg("test.txt")
.assert()
.success()
- .stdout("dummy-pager-from-config\n");
+ .stdout("dummy-pager-from-config");
}
#[test]