Date: Thu, 18 Aug 2016 07:43:18 +0000 (UTC) From: "Andrey A. Chernov" <ache@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r304339 - in stable/11/bin/sh: . tests/expansion Message-ID: <201608180743.u7I7hIod056027@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ache Date: Thu Aug 18 07:43:18 2016 New Revision: 304339 URL: https://svnweb.freebsd.org/changeset/base/304339 Log: MFC r302937 Path generation was not according to collate Approved by: jilles Added: stable/11/bin/sh/tests/expansion/pathname6.0 - copied unchanged from r302937, head/bin/sh/tests/expansion/pathname6.0 Modified: stable/11/bin/sh/expand.c stable/11/bin/sh/tests/expansion/Makefile stable/11/bin/sh/tests/expansion/pathname1.0 stable/11/bin/sh/tests/expansion/pathname2.0 Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/sh/expand.c ============================================================================== --- stable/11/bin/sh/expand.c Thu Aug 18 07:32:02 2016 (r304338) +++ stable/11/bin/sh/expand.c Thu Aug 18 07:43:18 2016 (r304339) @@ -1196,7 +1196,7 @@ expsortcmp(const void *p1, const void *p const char *s1 = *(const char * const *)p1; const char *s2 = *(const char * const *)p2; - return (strcmp(s1, s2)); + return (strcoll(s1, s2)); } Modified: stable/11/bin/sh/tests/expansion/Makefile ============================================================================== --- stable/11/bin/sh/tests/expansion/Makefile Thu Aug 18 07:32:02 2016 (r304338) +++ stable/11/bin/sh/tests/expansion/Makefile Thu Aug 18 07:43:18 2016 (r304339) @@ -66,6 +66,7 @@ ${PACKAGE}FILES+= pathname2.0 ${PACKAGE}FILES+= pathname3.0 ${PACKAGE}FILES+= pathname4.0 ${PACKAGE}FILES+= pathname5.0 +${PACKAGE}FILES+= pathname6.0 ${PACKAGE}FILES+= plus-minus1.0 ${PACKAGE}FILES+= plus-minus2.0 ${PACKAGE}FILES+= plus-minus3.0 Modified: stable/11/bin/sh/tests/expansion/pathname1.0 ============================================================================== --- stable/11/bin/sh/tests/expansion/pathname1.0 Thu Aug 18 07:32:02 2016 (r304338) +++ stable/11/bin/sh/tests/expansion/pathname1.0 Thu Aug 18 07:43:18 2016 (r304339) @@ -1,5 +1,9 @@ # $FreeBSD$ +unset LC_ALL +LC_COLLATE=C +export LC_COLLATE + failures=0 check() { Modified: stable/11/bin/sh/tests/expansion/pathname2.0 ============================================================================== --- stable/11/bin/sh/tests/expansion/pathname2.0 Thu Aug 18 07:32:02 2016 (r304338) +++ stable/11/bin/sh/tests/expansion/pathname2.0 Thu Aug 18 07:43:18 2016 (r304339) @@ -1,5 +1,9 @@ # $FreeBSD$ +unset LC_ALL +LC_COLLATE=C +export LC_COLLATE + failures=0 check() { Copied: stable/11/bin/sh/tests/expansion/pathname6.0 (from r302937, head/bin/sh/tests/expansion/pathname6.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/bin/sh/tests/expansion/pathname6.0 Thu Aug 18 07:43:18 2016 (r304339, copy of r302937, head/bin/sh/tests/expansion/pathname6.0) @@ -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))
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201608180743.u7I7hIod056027>