about summary refs log tree commit diff
path: root/Test
diff options
context:
space:
mode:
authorPeter Stephenson <p.w.stephenson@ntlworld.com>2020-05-23 18:01:26 +0100
committerPeter Stephenson <p.w.stephenson@ntlworld.com>2020-05-23 18:01:26 +0100
commit40723b3991557d0f5db66cbde9feb5cbc33bce78 (patch)
treeded5db16dda2582264846c256090f8bc317de5c3 /Test
parentb3148194d12064878bf55c6e37e24200cf93d9b8 (diff)
downloadzsh-40723b3991557d0f5db66cbde9feb5cbc33bce78.tar.gz
zsh-40723b3991557d0f5db66cbde9feb5cbc33bce78.tar.xz
zsh-40723b3991557d0f5db66cbde9feb5cbc33bce78.zip
45900: Fix issues with escaped newline in $-substitution.
Diffstat (limited to 'Test')
-rw-r--r--Test/D04parameter.ztst24
1 files changed, 21 insertions, 3 deletions
diff --git a/Test/D04parameter.ztst b/Test/D04parameter.ztst
index 6d2dd0d99..e51c955ee 100644
--- a/Test/D04parameter.ztst
+++ b/Test/D04parameter.ztst
@@ -2662,7 +2662,25 @@ F:behavior, see http://austingroupbugs.net/view.php?id=888
 -f:regression test for workers/45843#1
 ?(eval):1: bad substitution
 
-# Temporarily using the 'D' flag because it generates a "BUG:" message in
-# debug builds only.
  $ZTST_testdir/../Src/zsh -fc $'$\\\n('
-1Df:regression test for workers/45843#2: escaped newline in command substitution start token
+1:regression test for workers/45843#2: escaped newline in command substitution start token
+?zsh:2: parse error near `$('
+
+# `
+
+ eval $'echo $\\\n(printf "%d\\n" $(( 4 + 2 )) )'
+0:Normal command substitution with escaped newline
+>6
+
+ eval $'echo $\\\n(( 14 / 2 ))'
+0:Normal math eval with escaped newline after $
+>7
+
+ eval $'echo $(\\\n( 15 / 3 ))'
+0:Normal math eval with escaped newline after $(
+>5
+
+  function '*' { echo What a star; }
+  eval 'echo $(\*)'
+0:Backslash character other than newline is normal after $(
+>What a star