about summary refs log tree commit diff
path: root/Test/A01grammar.ztst
diff options
context:
space:
mode:
Diffstat (limited to 'Test/A01grammar.ztst')
-rw-r--r--Test/A01grammar.ztst12
1 files changed, 12 insertions, 0 deletions
diff --git a/Test/A01grammar.ztst b/Test/A01grammar.ztst
index f283451ce..a1ec2cc00 100644
--- a/Test/A01grammar.ztst
+++ b/Test/A01grammar.ztst
@@ -503,3 +503,15 @@
   $ZTST_testdir/../Src/zsh -f NonExistentScript
 127q:Non-existent script causes exit status 127
 ?$ZTST_testdir/../Src/zsh: can't open input file: NonExistentScript
+
+  (setopt nonomatch
+  # use this to get stuff at start of line
+  contents=$'# comment \'\necho value #with " stuff\n# comment\n#comment
+  echo not#comment\n'
+  eval 'VAR=$('"$contents"')'
+  print -l $VAR)
+0:comments within $(...)
+>value
+>not#comment
+
+