summaryrefslogtreecommitdiff
path: root/Test/W01history.ztst
diff options
context:
space:
mode:
Diffstat (limited to 'Test/W01history.ztst')
-rw-r--r--Test/W01history.ztst22
1 files changed, 22 insertions, 0 deletions
diff --git a/Test/W01history.ztst b/Test/W01history.ztst
index 0b2f60d1e..1d3f3cf6f 100644
--- a/Test/W01history.ztst
+++ b/Test/W01history.ztst
@@ -88,3 +88,25 @@ F:Check that a history bug introduced by workers/34160 is working again.
0:Modifier :P
>/my/path/for/testing
>/my/path/for/testing
+
+ $ZTST_testdir/../Src/zsh -fgis <<<'
+ SAVEHIST=7
+ print -rs "one\\"
+ print -rs "two\\\\"
+ print -rs "three\\\\\\"
+ print -rs "four\\\\\\\\"
+ print -rs "five\\\\\\\\\\"
+ print -s "while false\ndo\ntrue\\\\\n && break\ndone"
+ print -s "echo one\\\\\ntwo"
+ fc -W hist
+ fc -p -R hist
+ fc -l
+ rm hist' 2>/dev/null
+0:Lines ending in backslash saved and restored to history
+> 1 one\
+> 2 two\\
+> 3 three\\\
+> 4 four\\\\
+> 5 five\\\\\
+> 6 while false\ndo\ntrue\\n && break\ndone
+> 7 echo one\\ntwo