summaryrefslogtreecommitdiff
path: root/tests/sort
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1997-10-26 15:07:01 +0000
committerJim Meyering <jim@meyering.net>1997-10-26 15:07:01 +0000
commitd9eac1e2c09ecdbea2295a380ac0f36d4ecae73a (patch)
treef6648b03b89e8c03966f684597df14994a3f3d15 /tests/sort
parentfb9673ea4a4c72059c6ed13613c4924f1bcf10c5 (diff)
downloadcoreutils-d9eac1e2c09ecdbea2295a380ac0f36d4ecae73a.tar.xz
Add A, _, a tests using -f.
Diffstat (limited to 'tests/sort')
-rwxr-xr-xtests/sort/Test.pm11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/sort/Test.pm b/tests/sort/Test.pm
index b3ffbaadf..a46780762 100755
--- a/tests/sort/Test.pm
+++ b/tests/sort/Test.pm
@@ -183,6 +183,17 @@ my @tv = (
"_________U___iob\n_________U__abort\n_________U__abort\n_________U__fprintf\n_________U__free\n_________U__malloc\n_________U__malloc\n_________U__memcpy\n_________U__memset\n_________U_dyld_stub_binding_helper\n",
0],
+# Demonstrate that folding changes the ordering of e.g. A, a, and _
+# because while they normally (in the C locale) collate like A, _, a,
+# when using -f, `a' is compared as if it were `A'.
+["21a", '', "A\na\n_\n", "A\n_\na\n", 0],
+["21b", '-f', "A\na\n_\n", "A\na\n_\n", 0],
+["21c", '-f', "a\nA\n_\n", "A\na\n_\n", 0],
+["21d", '-f', "_\na\nA\n", "A\na\n_\n", 0],
+["21e", '-f', "a\n_\nA\n", "A\na\n_\n", 0],
+["21f", '-fs', "A\na\n_\n", "A\na\n_\n", 0],
+["21g", '-fu', "a\n_\n", "a\n_\n", 0],
+
);
sub test_vector