From owner-svn-src-stable@freebsd.org Thu Aug 18 07:43:19 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D082BBBE487; Thu, 18 Aug 2016 07:43:19 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE19311DF; Thu, 18 Aug 2016 07:43:19 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7I7hIDK056032; Thu, 18 Aug 2016 07:43:18 GMT (envelope-from ache@FreeBSD.org) Received: (from ache@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7I7hIod056027; Thu, 18 Aug 2016 07:43:18 GMT (envelope-from ache@FreeBSD.org) Message-Id: <201608180743.u7I7hIod056027@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ache set sender to ache@FreeBSD.org using -f From: "Andrey A. Chernov" Date: Thu, 18 Aug 2016 07:43:18 +0000 (UTC) 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 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Aug 2016 07:43:19 -0000 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))