about summary refs log tree commit diff
path: root/Test/B07emulate.ztst
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2012-10-07 19:46:46 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2012-10-07 19:46:46 +0000
commit4e2cdd795677e655f89b76b57611a196ce578432 (patch)
tree8fde8d99741f84cecb14f46f705ca1500d159af7 /Test/B07emulate.ztst
parent321471891e259c7b406f3cfaf1c076b28ae16a5f (diff)
downloadzsh-4e2cdd795677e655f89b76b57611a196ce578432.tar.gz
zsh-4e2cdd795677e655f89b76b57611a196ce578432.tar.xz
zsh-4e2cdd795677e655f89b76b57611a196ce578432.zip
30722: fix some cases where emulations or options were not propagated properly
from the emulate command
Diffstat (limited to 'Test/B07emulate.ztst')
-rw-r--r--Test/B07emulate.ztst25
1 files changed, 25 insertions, 0 deletions
diff --git a/Test/B07emulate.ztst b/Test/B07emulate.ztst
index dec809ea4..569640bb4 100644
--- a/Test/B07emulate.ztst
+++ b/Test/B07emulate.ztst
@@ -176,3 +176,28 @@
 0:Sticky emulation not triggered if sticky emulation unchanged
 >on
 >off
+
+  (
+  setopt ignorebraces
+  emulate zsh -o extendedglob -c '
+  [[ -o ignorebraces ]] || print "Yay, ignorebraces was reset"
+  [[ -o extendedglob ]] && print "Yay, extendedglob is set"
+  '
+  )
+0:emulate -c with options
+>Yay, ignorebraces was reset
+>Yay, extendedglob is set
+
+  (
+  setopt ignorebraces          
+  emulate zsh -o extendedglob
+  [[ -o ignorebraces ]] || print "Yay, ignorebraces is no longer set"
+  [[ -o extendedglob ]] && print "Yay, extendedglob is set"
+  )
+0:emulate with options but no -c
+>Yay, ignorebraces is no longer set
+>Yay, extendedglob is set
+
+  emulate zsh -o fixallmybugs 'print This was executed, bad'
+1:emulate -c with incorrect options
+?(eval):emulate:1: no such option: fixallmybugs