diff options
Diffstat (limited to 'Test/B02typeset.ztst')
-rw-r--r-- | Test/B02typeset.ztst | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/Test/B02typeset.ztst b/Test/B02typeset.ztst index d6d24210b..b27bb4f6b 100644 --- a/Test/B02typeset.ztst +++ b/Test/B02typeset.ztst @@ -454,7 +454,7 @@ fn() { typeset -p array nonexistent; } fn 1:declare -p shouldn't create scoped values ->typeset -a array=( foo bar ) +>typeset -g -a array=( foo bar ) ?fn:typeset: no such variable: nonexistent unsetopt typesetsilent @@ -490,7 +490,7 @@ ?0 ?(eval):5: read-only variable: pbro ?(eval):6: read-only variable: pbro -?typeset -r pbro +?typeset -g -r pbro ?0 ?(eval):10: read-only variable: pbro @@ -711,3 +711,13 @@ typeset isreadonly=still 1:typeset returns status 1 if setting readonly variable ?(eval):2: read-only variable: isreadonly + + if (( UID )); then + UID=$((UID+1)) date; echo "Status is printed, $?" + else + ZTST_skip="cannot test setuid error when tests run as superuser" + fi +0:when cannot change UID, the command isn't run +# 'date' did not run. +>Status is printed, 1 +*?*: failed to change user ID: * |