diff options
author | Chet Ramey <chet.ramey@case.edu> | 2019-01-07 09:27:52 -0500 |
---|---|---|
committer | Chet Ramey <chet.ramey@case.edu> | 2019-01-07 09:27:52 -0500 |
commit | d233b485e83c3a784b803fb894280773f16f2deb (patch) | |
tree | 16d51f3ccca2d4ad2d8f2da564d68ca848de595b /tests/new-exp.tests | |
parent | 64447609994bfddeef1061948022c074093e9a9f (diff) | |
download | bash-d233b485e83c3a784b803fb894280773f16f2deb.tar.gz |
bash-5.0 distribution sources and documentationbash-5.0
Diffstat (limited to 'tests/new-exp.tests')
-rw-r--r-- | tests/new-exp.tests | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/new-exp.tests b/tests/new-exp.tests index c4aa9d16..557d6b44 100644 --- a/tests/new-exp.tests +++ b/tests/new-exp.tests @@ -1,3 +1,7 @@ +if (( $UID == 0 )); then + echo "new-exp.tests: the test suite should not be run as root" >&2 +fi + # must do this because posix mode causes process substitution to be disabled # and flagged as a syntax error, which causes the shell to exit set +o posix @@ -340,7 +344,7 @@ recho "${foo:-$@}" expect '<ab> <cd> <ef> <gh>' recho "${foo:-"$@"}" -shift $# +shift ${#} expect nothing recho $xxx"$@" expect nothing @@ -498,7 +502,7 @@ recho ${*%?} recho ${@#?} recho ${*#?} -shift $# +shift ${#} set -u ( recho $9 ; echo after 1) ( recho ${9} ; echo after 2) @@ -597,6 +601,9 @@ ${THIS_SH} ./new-exp9.sub # new parameter transformation `@' expansion operator ${THIS_SH} ./new-exp10.sub +# parameter substring replacement and removal operators with multibyte chars +${THIS_SH} ./new-exp11.sub + # problems with stray CTLNUL in bash-4.0-alpha unset a a=/a |