Path generation was not according to collate
Approved by: jilles
This commit is contained in:
parent
86f1146329
commit
143d321a30
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=302937
@ -1196,7 +1196,7 @@ expsortcmp(const void *p1, const void *p2)
|
|||||||
const char *s1 = *(const char * const *)p1;
|
const char *s1 = *(const char * const *)p1;
|
||||||
const char *s2 = *(const char * const *)p2;
|
const char *s2 = *(const char * const *)p2;
|
||||||
|
|
||||||
return (strcmp(s1, s2));
|
return (strcoll(s1, s2));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -66,6 +66,7 @@ ${PACKAGE}FILES+= pathname2.0
|
|||||||
${PACKAGE}FILES+= pathname3.0
|
${PACKAGE}FILES+= pathname3.0
|
||||||
${PACKAGE}FILES+= pathname4.0
|
${PACKAGE}FILES+= pathname4.0
|
||||||
${PACKAGE}FILES+= pathname5.0
|
${PACKAGE}FILES+= pathname5.0
|
||||||
|
${PACKAGE}FILES+= pathname6.0
|
||||||
${PACKAGE}FILES+= plus-minus1.0
|
${PACKAGE}FILES+= plus-minus1.0
|
||||||
${PACKAGE}FILES+= plus-minus2.0
|
${PACKAGE}FILES+= plus-minus2.0
|
||||||
${PACKAGE}FILES+= plus-minus3.0
|
${PACKAGE}FILES+= plus-minus3.0
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
# $FreeBSD$
|
# $FreeBSD$
|
||||||
|
|
||||||
|
unset LC_ALL
|
||||||
|
LC_COLLATE=C
|
||||||
|
export LC_COLLATE
|
||||||
|
|
||||||
failures=0
|
failures=0
|
||||||
|
|
||||||
check() {
|
check() {
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
# $FreeBSD$
|
# $FreeBSD$
|
||||||
|
|
||||||
|
unset LC_ALL
|
||||||
|
LC_COLLATE=C
|
||||||
|
export LC_COLLATE
|
||||||
|
|
||||||
failures=0
|
failures=0
|
||||||
|
|
||||||
check() {
|
check() {
|
||||||
|
29
bin/sh/tests/expansion/pathname6.0
Normal file
29
bin/sh/tests/expansion/pathname6.0
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
# $FreeBSD$
|
||||||
|
|
||||||
|
unset LC_ALL
|
||||||
|
LC_COLLATE=en_US.US-ASCII
|
||||||
|
export LC_COLLATE
|
||||||
|
|
||||||
|
failures=0
|
||||||
|
|
||||||
|
check() {
|
||||||
|
testcase=$1
|
||||||
|
expect=$2
|
||||||
|
eval "set -- $testcase"
|
||||||
|
actual="$*"
|
||||||
|
if [ "$actual" != "$expect" ]; then
|
||||||
|
failures=$((failures+1))
|
||||||
|
printf '%s\n' "For $testcase, expected $expect actual $actual"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
set -e
|
||||||
|
T=$(mktemp -d ${TMPDIR:-/tmp}/sh-test.XXXXXX)
|
||||||
|
trap 'rm -rf $T' 0
|
||||||
|
cd -P $T
|
||||||
|
|
||||||
|
touch A B a b
|
||||||
|
|
||||||
|
check '*' 'a A b B'
|
||||||
|
|
||||||
|
exit $((failures != 0))
|
Loading…
Reference in New Issue
Block a user