Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/usr.bin/printf Make sure we're in the standard locale ...



details:   https://anonhg.NetBSD.org/src/rev/8798181de3ed
branches:  trunk
changeset: 433342:8798181de3ed
user:      kre <kre%NetBSD.org@localhost>
date:      Sat Sep 08 18:24:01 2018 +0000

description:
Make sure we're in the standard locale when testing for printf
being built in to the shell, so we don't receive an unrecognisable
(to the script) message from the shell when we ask it.

diffstat:

 tests/usr.bin/printf/t_builtin.sh |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (19 lines):

diff -r ebb447ffa7f2 -r 8798181de3ed tests/usr.bin/printf/t_builtin.sh
--- a/tests/usr.bin/printf/t_builtin.sh Sat Sep 08 18:10:35 2018 +0000
+++ b/tests/usr.bin/printf/t_builtin.sh Sat Sep 08 18:24:01 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_builtin.sh,v 1.1 2018/09/05 21:05:40 kre Exp $
+# $NetBSD: t_builtin.sh,v 1.2 2018/09/08 18:24:01 kre Exp $
 #
 # Copyright (c) 2018 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -95,7 +95,8 @@
 
 setup()
 {
-       case "$( ${TEST_SH} -c 'type printf' 2>&1 )" in
+       case "$(unset LANG LC_ALL LC_NUMERIC LC_CTYPE LC_MESSAGES
+           ${TEST_SH} -c 'type printf' 2>&1 )" in
 
        ( *[Bb]uiltin* | *[Bb]uilt[-\ ][Ii]n* )
                # nothing here, it all happens below.



Home | Main Index | Thread Index | Old Index