Source-Changes-HG archive

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

[src/trunk]: src/tests/bin/sh By special request, add a check that ${011} is ...



details:   https://anonhg.NetBSD.org/src/rev/8792629e6ca5
branches:  trunk
changeset: 354073:8792629e6ca5
user:      kre <kre%NetBSD.org@localhost>
date:      Sat Jun 03 11:23:01 2017 +0000

description:
By special request, add a check that ${011} is ${11} not ${9} (etc) and
that ${08} is not an error.

diffstat:

 tests/bin/sh/t_expand.sh |  7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diffs (21 lines):

diff -r cef901085725 -r 8792629e6ca5 tests/bin/sh/t_expand.sh
--- a/tests/bin/sh/t_expand.sh  Sat Jun 03 10:31:16 2017 +0000
+++ b/tests/bin/sh/t_expand.sh  Sat Jun 03 11:23:01 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_expand.sh,v 1.15 2017/06/02 01:48:13 kre Exp $
+# $NetBSD: t_expand.sh,v 1.16 2017/06/03 11:23:01 kre Exp $
 #
 # Copyright (c) 2007, 2009 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -423,6 +423,11 @@
        check "${TEST_SH} -c 'echo 0=\${00} 1=\${01} 2=\${02}' a b c" \
                        '0=a 1=b 2=c' 0
 
+       # by special request, for PaulG...  (${0...} is not octal!)
+       check \
+           'set -- a b c d e f g h i j k l m; echo "$#: ${08} ${010} ${011}"' \
+               '13: h j k' 0
+
        results
 }
 



Home | Main Index | Thread Index | Old Index