summaryrefslogtreecommitdiff
path: root/tests/strcoll-0-names
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2016-08-21 05:23:24 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2016-08-21 05:23:24 +0000
commita3ec215973c3653ebdeb81dcdd1274519c376a3d (patch)
treedc0edc2133786db0565f19d51c4a9957dd69e2ac /tests/strcoll-0-names
downloaddiffutils-tarball-master.tar.gz
Diffstat (limited to 'tests/strcoll-0-names')
-rwxr-xr-xtests/strcoll-0-names25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/strcoll-0-names b/tests/strcoll-0-names
new file mode 100755
index 0000000..33c4a3c
--- /dev/null
+++ b/tests/strcoll-0-names
@@ -0,0 +1,25 @@
+#!/bin/sh
+# Check that diff responds well with two different file names
+# that compare equal with strcoll. See:
+# http://lists.gnu.org/archive/html/bug-diffutils/2013-03/msg00012.html
+
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+
+# These two names compare equal in the en_US.UTF-8 locale
+# in current (2013) versions of glibc.
+# On systems where the names do not compare equal,
+# this diff test should still do the right thing.
+LC_ALL=en_US.UTF-8
+export LC_ALL
+name1='エンドカード1'
+name2='ブックレット1'
+
+mkdir d1 d2 || fail=1
+echo x >d1/"$name1" || fail=1
+echo x >d2/"$name2" || fail=1
+
+# This should report a difference, but on the affected systems
+# diffutils 3.3 does not.
+diff d1 d2 && fail=1
+
+Exit $fail