on master help sign in
Tests ~ `echo` has portability issues; for CI, replace with `printf`
3a7743fRoy Ivy III
tests/examples/bat.conf+1−1
@@ -2,4 +2,4 @@
2--paging=always
2--paging=always
3
3
4# Output a dummy message for the integration test.
4# 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() {
372#[test]
372#[test]
373fn pager_basic() {
373fn pager_basic() {
374 bat()
374 bat()
375− .env("PAGER", "echo pager-output")
375+ .env("PAGER", "printf pager-output")
376 .arg("--paging=always")
376 .arg("--paging=always")
377 .arg("test.txt")
377 .arg("test.txt")
378 .assert()
378 .assert()
379 .success()
379 .success()
380− .stdout("pager-output\n");
380+ .stdout("pager-output");
381}
381}
382
382
383#[test]
383#[test]
384fn pager_overwrite() {
384fn pager_overwrite() {
385 bat()
385 bat()
386− .env("PAGER", "echo other-pager")
386+ .env("PAGER", "printf other-pager")
387− .env("BAT_PAGER", "echo pager-output")
387+ .env("BAT_PAGER", "printf pager-output")
388 .arg("--paging=always")
388 .arg("--paging=always")
389 .arg("test.txt")
389 .arg("test.txt")
390 .assert()
390 .assert()
391 .success()
391 .success()
392− .stdout("pager-output\n");
392+ .stdout("pager-output");
393}
393}
394
394
395#[test]
395#[test]
396fn pager_disable() {
396fn pager_disable() {
397 bat()
397 bat()
398− .env("PAGER", "echo other-pager")
398+ .env("PAGER", "printf other-pager")
399 .env("BAT_PAGER", "")
399 .env("BAT_PAGER", "")
400 .arg("--paging=always")
400 .arg("--paging=always")
401 .arg("test.txt")
401 .arg("test.txt")
@@ -421,7 +421,7 @@ fn config_read_arguments_from_file() {
421 .arg("test.txt")
421 .arg("test.txt")
422 .assert()
422 .assert()
423 .success()
423 .success()
424− .stdout("dummy-pager-from-config\n");
424+ .stdout("dummy-pager-from-config");
425}
425}
426
426
427#[test]
427#[test]