summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2011-08-24 00:09:30 +0100
committerPádraig Brady <P@draigBrady.com>2011-08-24 00:21:17 +0100
commit1f93c9633997b8843e9b30ad29fe3b2631cf3655 (patch)
tree81326b6a5d93ab8b14e518abbc01c3a51d26ceb9 /tests
parent423b079f5324b9097d487e752b71a8399b970ba9 (diff)
downloadcoreutils-1f93c9633997b8843e9b30ad29fe3b2631cf3655.tar.xz
pr: fix so that LAST_PAGE is honored with -T
Ever since the LAST_PAGE functionality was added in commit ed0923a1, 1996-12-05, "Apply big patch (patch-20) from Roland Huebner" it was ignored when -t or -T were specified or when -l <= 10. * src/pr.c (print_page): Increment the current page here. (print_header): Don't increment the current page here. * tests/pr/pr-tests: Add a test case. * NEWS: Mention the fix Reported at http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9347
Diffstat (limited to 'tests')
-rwxr-xr-xtests/pr/pr-tests4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/pr/pr-tests b/tests/pr/pr-tests
index aafc0cfdb..d3dc25fba 100755
--- a/tests/pr/pr-tests
+++ b/tests/pr/pr-tests
@@ -403,6 +403,10 @@ my @tv = (
# This would clobber so much of the heap, it'd segfault or abort every time.
['smash-heap', '-t -e300', "a".("\b"x50)."\t", "a\b".(" "x300)."\n", 0],
['smash-heap8', '-t -e', "a".("\b"x50)."\t", "a\b".(" "x 8)."\n", 0],
+
+# Before coreutils-8.13 page numbers were not handled correctly when
+# headers were not printed (when -l <= 10 or -t or -T specified)
+['page-range', '+1:1 -2 -l1 -s" "', "a\nb\nc\n", "a b\n", 0],
);
# Convert the above old-style test vectors to the newer