Module Name: src
Committed By: kre
Date: Sat Jun 3 14:45:59 UTC 2017
Modified Files:
src/tests/bin/sh: t_expand.sh
Log Message:
Complete the special request by quoting chapter & verse from POSIX
as to why ${011} is ${11} and not ${9} (that is, why we interpret it
that way, the "why could it not be the other way?" is just "because
that is not how it was ever implemented".
To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/tests/bin/sh/t_expand.sh
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tests/bin/sh/t_expand.sh
diff -u src/tests/bin/sh/t_expand.sh:1.16 src/tests/bin/sh/t_expand.sh:1.17
--- src/tests/bin/sh/t_expand.sh:1.16 Sat Jun 3 11:23:01 2017
+++ src/tests/bin/sh/t_expand.sh Sat Jun 3 14:45:59 2017
@@ -1,4 +1,4 @@
-# $NetBSD: t_expand.sh,v 1.16 2017/06/03 11:23:01 kre Exp $
+# $NetBSD: t_expand.sh,v 1.17 2017/06/03 14:45:59 kre Exp $
#
# Copyright (c) 2007, 2009 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -424,6 +424,11 @@ shell_params_body() {
'0=a 1=b 2=c' 0
# by special request, for PaulG... (${0...} is not octal!)
+
+ # Posix XCU 2.5.1 (Issue 7 TC2 pg 2349 lines 74835..6):
+ # The digits denoting the positional parameters shall always
+ # be interpreted as a decimal value, even if there is a leading zero.
+
check \
'set -- a b c d e f g h i j k l m; echo "$#: ${08} ${010} ${011}"' \
'13: h j k' 0