summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMartin Nordholts <enselic@gmail.com>2021-01-05 10:14:30 +0100
committerDavid Peter <sharkdp@users.noreply.github.com>2021-01-06 11:58:08 +0100
commit9ccb667653ca2e8e6243becc9312ca30dc2ce989 (patch)
treee7cf404578e7952b00085fc63c55a58194066876 /tests
parentb600f62ab68e0a11a9bb69dcf45648632d3f52ee (diff)
Add integration test for unparsable pager
Right now all tests pass even if we e.g. return Ok(OutputType::stdout()) instead of doing .chain_err(|| "Could not parse pager command.")? so add a test to make sure this functionality don't break.
Diffstat (limited to 'tests')
-rw-r--r--tests/integration_tests.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs
index e16a8a91..7ab99bb2 100644
--- a/tests/integration_tests.rs
+++ b/tests/integration_tests.rs
@@ -523,6 +523,17 @@ fn alias_pager_disable_long_overrides_short() {
}
#[test]
+fn pager_failed_to_parse() {
+ bat()
+ .env("BAT_PAGER", "mismatched-quotes 'a")
+ .arg("--paging=always")
+ .arg("test.txt")
+ .assert()
+ .failure()
+ .stderr(predicate::str::contains("Could not parse pager command"));
+}
+
+#[test]
fn config_location_test() {
bat_with_config()
.env("BAT_CONFIG_PATH", "bat.conf")