Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/bin/sh When embedding a command in a subshell "( ... )...
details: https://anonhg.NetBSD.org/src/rev/79376167fdc1
branches: trunk
changeset: 344470:79376167fdc1
user: christos <christos%NetBSD.org@localhost>
date: Thu Mar 31 16:22:27 2016 +0000
description:
When embedding a command in a subshell "( ... )" avoid accidentally
producing (( (when the cmd starts with a '(' as that as a reserved
sequence (according to posix) and some shells do treat it specially.
So, force a space after the enclosing '(' to avoid the problem.
For symmetry, put a space before the concluding ')' as well, though
there is nothing special about )). (from kre@)
diffstat:
tests/bin/sh/t_set_e.sh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (18 lines):
diff -r 6528bf765a68 -r 79376167fdc1 tests/bin/sh/t_set_e.sh
--- a/tests/bin/sh/t_set_e.sh Thu Mar 31 16:21:52 2016 +0000
+++ b/tests/bin/sh/t_set_e.sh Thu Mar 31 16:22:27 2016 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_set_e.sh,v 1.3 2016/03/27 14:50:01 christos Exp $
+# $NetBSD: t_set_e.sh,v 1.4 2016/03/31 16:22:27 christos Exp $
#
# Copyright (c) 2007 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -63,7 +63,7 @@
# is thus important to test. (PR bin/29861)
echeck()
{
- check1 'eval '"'($1)'" "$2" "eval '($1)'"
+ check1 'eval '"'( $1 )'" "$2" "eval '($1)'"
}
atf_test_case all
Home |
Main Index |
Thread Index |
Old Index