diff options
author | Jim Meyering <jim@meyering.net> | 1999-05-22 02:41:39 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1999-05-22 02:41:39 +0000 |
commit | 28c635adb2d06818e66d5848e91d3a115259d168 (patch) | |
tree | 41195041c0c224697c5fbe50cc38cc6f6976da3b /tests/sort | |
parent | 125ce0f85c478aee21207a3ff7b70f8dffc4cebc (diff) | |
download | coreutils-28c635adb2d06818e66d5848e91d3a115259d168.tar.xz |
(use-nl): New test from Paul Eggert.
Diffstat (limited to 'tests/sort')
-rwxr-xr-x | tests/sort/Test.pm | 23 |
1 files changed, 23 insertions, 0 deletions
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 |