From bd6e9d030cbf709d40fb480449de200d49449dc8 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Fri, 26 Apr 2019 10:11:47 -0700 Subject: more: better behavior with directories. Also fix the non-tty output. Also tweak our output so the tests pass with TEST_HOST=1 too. --- tests/more.test | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tests/more.test') diff --git a/tests/more.test b/tests/more.test index 4dcf6d85..ac701f77 100644 --- a/tests/more.test +++ b/tests/more.test @@ -9,6 +9,9 @@ line1 line2 EOF -testing "non-tty" "more file1 | cat -" "line1\nline2\n" "" "" +# For non-tty output, headers are shown even if there's only one file. +testing "non-tty" "more file1 | cat -" "::::::::::::::\nfile1\n::::::::::::::\nline1\nline2\n" "" "" + +testing "directory" "more ." "\n*** .: directory ***\n\n" "" "" rm file1 -- cgit v1.2.3