about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2023-01-27 18:42:20 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2023-01-27 18:42:42 +0000
commit096e72ce78ac9fb6fa944261d6cc386f6d067326 (patch)
treeb64dc194893dd2e22370ea00ed1a96b67a60b719
parentf264fcde80a7ba2b687a1b94d567c48bbdf3423d (diff)
downloadzsh-master.tar.gz
zsh-master.tar.xz
zsh-master.zip
unposted (cribbed from users/28784 by Roman): Add XFail tests for substituting a single-quoting backslash. HEAD master
-rw-r--r--ChangeLog6
-rw-r--r--Test/D04parameter.ztst15
2 files changed, 21 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 6a7af6eed..44b24c534 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-01-27  Daniel Shahaf  <d.s@daniel.shahaf.name>
+
+	* unposted (cribbed from users/28784 by Roman):
+	Test/D04parameter.ztst: Add XFail tests for substituting a
+	single-quoting backslash.
+
 2023-01-27  Shohei YOSHIDA  <syohex@gmail.com>
 
 	* 51330: Completion/Unix/Command/_python: Update python3
diff --git a/Test/D04parameter.ztst b/Test/D04parameter.ztst
index 6bf55b4db..29275f13f 100644
--- a/Test/D04parameter.ztst
+++ b/Test/D04parameter.ztst
@@ -2727,3 +2727,18 @@ F:behavior, see http://austingroupbugs.net/view.php?id=888
 1:parameter expansion flags parsing error gives a clue
 ?(eval):1: error in flags near position 7 in '${(zZ+x+):-}'
 
+ slash='/'
+ print -r -- x${slash/'/'}y
+-Df:(users/28784) substituting a single-quoted backslash, part #1: slash
+>xy
+
+ single_quote="'"
+ print -r -- x${single_quote/'/'}y
+-Df:(users/28784) substituting a single-quoted backslash, part #2: single quote
+>x/y
+
+ control="foobar"
+ print -r -- x${control/'bar'}y
+0:(users/28784 inspired this) substituting a single-quoted backslash, part #3: control
+>xfooy
+