diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2010-08-13 15:57:01 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2010-08-13 15:57:52 -0700 |
commit | b5f9a6a176a32d73745fc61366c26f2c1ff9fca7 (patch) | |
tree | c099d74fee0739d13bd63393fdb9a5a3268f6f21 | |
parent | 9899e6cd853baf2704fdb52e55270ffbabd37dff (diff) | |
download | coreutils-b5f9a6a176a32d73745fc61366c26f2c1ff9fca7.tar.xz |
* tests/misc/sort (use-nl): Fix comment to match the test case.
-rwxr-xr-x | tests/misc/sort | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/tests/misc/sort b/tests/misc/sort index fedbf278f..5bc526a27 100755 --- a/tests/misc/sort +++ b/tests/misc/sort @@ -310,26 +310,13 @@ my @Tests = ["nul-nls", '', {IN=>"\0b\n\0a\n"}, {OUT=>"\0a\n\0b\n"}], # 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. +# A previous version of POSIX incorrectly required that the newline +# at the end of the input line contributed to the sort, which would +# mean that an empty line should sort after a line starting with a tab +# (because \t precedes \n in the ASCII collating sequence). +# GNU 'sort' was altered to do this, but was changed back once it +# was discovered to be a POSIX bug (and the POSIX bug was fixed). +# Check that 'sort' conforms to the fixed POSIX, not to the buggy one. ["use-nl", '', {IN=>"\n\t\n"}, {OUT=>"\n\t\n"}], # Specifying two -o options should evoke a failure |