From 4b04f901fe645caa1f83073993dd92a585a606d8 Mon Sep 17 00:00:00 2001 From: einfachIrgendwer0815 <85333734+einfachIrgendwer0815@users.noreply.github.com> Date: Mon, 7 Aug 2023 19:23:52 +0200 Subject: [PATCH] Add test for `BAT_PAGING` --- tests/integration_tests.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index 61948280..d494d280 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -843,6 +843,17 @@ fn pager_failed_to_parse() { .stderr(predicate::str::contains("Could not parse pager command")); } +#[test] +fn env_var_bat_paging() { + bat() + .env("BAT_PAGER", "echo pager-output") + .env("BAT_PAGING", "always") + .arg("test.txt") + .assert() + .success() + .stdout(predicate::eq("pager-output\n")); +} + #[test] fn diagnostic_sanity_check() { bat()