Blame tests/strcoll-0-names
|
Packit |
33f14e |
#!/bin/sh
|
|
Packit |
33f14e |
# Check that diff responds well with two different file names
|
|
Packit |
33f14e |
# that compare equal with strcoll. See:
|
|
Packit |
33f14e |
# http://lists.gnu.org/archive/html/bug-diffutils/2013-03/msg00012.html
|
|
Packit |
33f14e |
|
|
Packit |
33f14e |
. "${srcdir=.}/init.sh"; path_prepend_ ../src
|
|
Packit |
33f14e |
|
|
Packit |
33f14e |
# These two names compare equal in the en_US.UTF-8 locale
|
|
Packit |
33f14e |
# in current (2013) versions of glibc.
|
|
Packit |
33f14e |
# On systems where the names do not compare equal,
|
|
Packit |
33f14e |
# this diff test should still do the right thing.
|
|
Packit |
33f14e |
LC_ALL=en_US.UTF-8
|
|
Packit |
33f14e |
export LC_ALL
|
|
Packit |
33f14e |
name1='エンドカード1'
|
|
Packit |
33f14e |
name2='ブックレット1'
|
|
Packit |
33f14e |
|
|
Packit |
33f14e |
mkdir d1 d2 || fail=1
|
|
Packit |
33f14e |
echo x >d1/"$name1" || fail=1
|
|
Packit |
33f14e |
echo x >d2/"$name2" || fail=1
|
|
Packit |
33f14e |
|
|
Packit |
33f14e |
# This should report a difference, but on the affected systems
|
|
Packit |
33f14e |
# diffutils 3.3 does not.
|
|
Packit |
33f14e |
diff d1 d2 && fail=1
|
|
Packit |
33f14e |
|
|
Packit |
33f14e |
Exit $fail
|