on master help sign in
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

commit3a7743ffc5ed7c770bd61bbf67ba1b52419dcfd1 authorRoy Ivy III <rivy.dev@gmail.com> dateTue 26 May 2020, 21:08 (6 years ago) parent9cc8e52
2 files changed+8−8
tests/examples/bat.conf+1−1 tests/integration_tests.rs+7−7
tests/examples/bat.conf+1−1
@@ -2,4 +2,4 @@
22--paging=always
33
44# Output a dummy message for the integration test.
5−--pager="echo dummy-pager-from-config"
5+--pager="printf dummy-pager-from-config"
tests/integration_tests.rs+7−7
@@ -372,30 +372,30 @@ fn do_not_exit_directory() {
372372#[test]
373373fn pager_basic() {
374374 bat()
375− .env("PAGER", "echo pager-output")
375+ .env("PAGER", "printf pager-output")
376376 .arg("--paging=always")
377377 .arg("test.txt")
378378 .assert()
379379 .success()
380− .stdout("pager-output\n");
380+ .stdout("pager-output");
381381}
382382
383383#[test]
384384fn pager_overwrite() {
385385 bat()
386− .env("PAGER", "echo other-pager")
387− .env("BAT_PAGER", "echo pager-output")
386+ .env("PAGER", "printf other-pager")
387+ .env("BAT_PAGER", "printf pager-output")
388388 .arg("--paging=always")
389389 .arg("test.txt")
390390 .assert()
391391 .success()
392− .stdout("pager-output\n");
392+ .stdout("pager-output");
393393}
394394
395395#[test]
396396fn pager_disable() {
397397 bat()
398− .env("PAGER", "echo other-pager")
398+ .env("PAGER", "printf other-pager")
399399 .env("BAT_PAGER", "")
400400 .arg("--paging=always")
401401 .arg("test.txt")
@@ -421,7 +421,7 @@ fn config_read_arguments_from_file() {
421421 .arg("test.txt")
422422 .assert()
423423 .success()
424− .stdout("dummy-pager-from-config\n");
424+ .stdout("dummy-pager-from-config");
425425}
426426
427427#[test]