From 28c635adb2d06818e66d5848e91d3a115259d168 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 22 May 1999 02:41:39 +0000 Subject: (use-nl): New test from Paul Eggert. --- tests/sort/Test.pm | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'tests/sort/Test.pm') diff --git a/tests/sort/Test.pm b/tests/sort/Test.pm index a91f49014..b48031e29 100755 --- a/tests/sort/Test.pm +++ b/tests/sort/Test.pm @@ -214,6 +214,29 @@ my @tv = ( # (i.e., not when configured with --disable-nls). ["nul-nls", '', "\0b\n\0a\n", "\0a\n\0b\n", 0], +# Paul Eggert wrote: +# I tested the revised `sort' against Solaris `sort', and found a +# discrepancy that turns out to be a longstanding bug in GNU sort. +# POSIX.2 specifies that a newline is part of the input line, and should +# be significant during comparison; but with GNU sort the newline is +# insignificant. Here is an example of the bug: +# +# $ od -c t +# 0000000 \n \t \n +# 0000003 +# $ sort t | od -c +# 0000000 \n \t \n +# 0000003 +# +# The correct output of the latter command should be +# +# 0000000 \t \n \n +# 0000003 +# +# because \t comes before \n in the collating sequence, and the trailing +# \n's are part of the input line. +["use-nl", '', "\n\t\n", "\t\n\n", 0], + ); sub test_vector -- cgit v1.2.3-70-g09d2