summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorsharkdp <davidpeter@web.de>2018-11-04 10:56:31 +0100
committerDavid Peter <sharkdp@users.noreply.github.com>2018-11-04 11:19:49 +0100
commit278d84140864c65f91ec7a3d19741bcc94987b45 (patch)
treec41791e7968f05f6b29c6416362f4476bec0f46b /tests
parent5f576f1ecf0f431370a77abe04a7946c192529da (diff)
Move '--paging' arg to config file.
Diffstat (limited to 'tests')
-rw-r--r--tests/examples/bat.conf6
-rw-r--r--tests/integration_tests.rs5
2 files changed, 7 insertions, 4 deletions
diff --git a/tests/examples/bat.conf b/tests/examples/bat.conf
index 96a04342..614ab40d 100644
--- a/tests/examples/bat.conf
+++ b/tests/examples/bat.conf
@@ -1 +1,5 @@
---paging=always \ No newline at end of file
+# Make sure that the pager gets executed
+--paging=always
+
+# Output a dummy message for the integration test.
+--pager="echo dummy-pager-from-config"
diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs
index 28761188..c30c2cac 100644
--- a/tests/integration_tests.rs
+++ b/tests/integration_tests.rs
@@ -343,12 +343,11 @@ fn config_location_test() {
}
#[test]
-fn config_read_paging_test() {
+fn config_read_arguments_from_file() {
bat_with_config()
.env("BAT_CONFIG_PATH", "bat.conf")
- .env("BAT_PAGER", "echo testing-config-file")
.arg("test.txt")
.assert()
.success()
- .stdout("testing-config-file\n");
+ .stdout("dummy-pager-from-config\n");
}