From 70a1082224440f8a105568892d3e3c8e8a672405 Mon Sep 17 00:00:00 2001 From: Thomas Lauf Date: Fri, 14 Apr 2023 13:50:35 +0200 Subject: [PATCH] Use local man pages in tests We need to set the value of `MANPATH` to the local man pages when running helper function 'run_cmd_wait_nofail'. Use the already set Timewarrior environment for this. Signed-off-by: Thomas Lauf --- ChangeLog | 2 ++ test/help.t | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6fe978c0..565f7b50 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ - #529 Fix summary truncating multibyte characters in long anotations (thanks to Maxim Beder, Leon Grünewald) +- Use local man pages in tests + (thanks to Maxim Beder) ------ current release --------------------------- diff --git a/test/help.t b/test/help.t index 786855dd..8bb6534b 100755 --- a/test/help.t +++ b/test/help.t @@ -64,14 +64,14 @@ class TestHelp(TestCase): def test_help_with_command_should_show_man_page(self): """timew help with command should show man page""" - _, expected, _ = run_cmd_wait_nofail(["man", "timew-start"]) + _, expected, _ = run_cmd_wait_nofail(["man", "timew-start"], env=self.t.env) _, actual, _ = self.t("help start") self.assertEqual(actual, expected) def test_help_with_unknown_argument_should_show_error_message(self): """timew help with unknown argument should show error message""" - _, _, expected = run_cmd_wait_nofail(["man", "timew-bogus"]) + _, _, expected = run_cmd_wait_nofail(["man", "timew-bogus"], env=self.t.env) _, _, actual = self.t.runError("help bogus") self.assertEqual(actual, expected)