]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Do not consider newline to be part of a line when comparing lines
authorJim Meyering <jim@meyering.net>
Thu, 4 Nov 1999 23:12:13 +0000 (23:12 +0000)
committerJim Meyering <jim@meyering.net>
Thu, 4 Nov 1999 23:12:13 +0000 (23:12 +0000)
in `sort' and `comm'.  POSIX.2 requires that we consider newline,
but this is a bug in the spec and the bug will likely be fixed.

Update tests `use-nl' and `11d' to reflect this change.

tests/sort/Test.pm

index b48031e2964cb7158b89d80464ed3fc4f663d7bc..5bfd309534e7518e15cb89c23663a7165ce67f80 100755 (executable)
@@ -117,7 +117,7 @@ my @tv = (
 # Before 1.22m, the first key comparison reported equality.
 # With 1.22m, they compare different: "a" sorts before "a\n",
 # and the second key spec isn't even used.
-["11d", '-t: -k2,2b -k3,3', "z:a :b\na\t:a\n", "z:a :b\na\t:a\n", 0],
+["11d", '-t: -k2,2b -k3,3', "z:a :b\na\t:a\n", "a\t:a\nz:a :b\n", 0],
 #
 # Exercise bug re comparing `-' and integers.
 ["12a", '-n -t: +1', "a:1\nb:-\n", "b:-\na:1\n", 0],
@@ -235,7 +235,7 @@ my @tv = (
 #
 # 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],
+["use-nl", '', "\n\t\n", "\n\t\n", 0],
 
 );