summaryrefslogtreecommitdiffstats
path: root/Test/E01options.ztst
diff options
context:
space:
mode:
authordana <dana@dana.is>2019-12-28 20:45:55 -0600
committerdana <dana@dana.is>2020-02-14 16:06:58 -0600
commitb15bd4aa590db8087d1e8f2eb1af2874f5db814d (patch)
treec5bcf332390a7d78f8a3298d6cd6e880c04b0431 /Test/E01options.ztst
parentClean up error-message white space (diff)
downloadzsh-b15bd4aa590db8087d1e8f2eb1af2874f5db814d.tar
zsh-b15bd4aa590db8087d1e8f2eb1af2874f5db814d.tar.gz
zsh-b15bd4aa590db8087d1e8f2eb1af2874f5db814d.tar.bz2
zsh-b15bd4aa590db8087d1e8f2eb1af2874f5db814d.tar.lz
zsh-b15bd4aa590db8087d1e8f2eb1af2874f5db814d.tar.xz
zsh-b15bd4aa590db8087d1e8f2eb1af2874f5db814d.tar.zst
zsh-b15bd4aa590db8087d1e8f2eb1af2874f5db814d.zip
Add unsetopt/PRIVILEGED tests
Diffstat (limited to 'Test/E01options.ztst')
-rw-r--r--Test/E01options.ztst10
1 files changed, 9 insertions, 1 deletions
diff --git a/Test/E01options.ztst b/Test/E01options.ztst
index 680f49082..cfe2c75cc 100644
--- a/Test/E01options.ztst
+++ b/Test/E01options.ztst
@@ -74,7 +74,6 @@
# HASH_LIST_ALL )
# PRINT_EXIT_STATUS haven't worked out what this does yet, although
# Bart suggested a fix.
-# PRIVILEGED (similar to GLOBAL_RCS)
# RCS ( " " " " )
# SH_OPTION_LETTERS even I found this too dull to set up a test for
# SINGLE_COMMAND kills shell
@@ -95,6 +94,15 @@
%test
+ # setopt should move on to the next operation in the face of an error, but
+ # preserve the >0 return code
+ unsetopt aliases
+ setopt not_a_real_option aliases && return 2
+ print -r - $options[aliases]
+0:setopt error handling
+?(eval):setopt:4: no such option: not_a_real_option
+>on
+
alias echo='print foo'
unsetopt aliases
# use eval else aliases are all parsed at start