about summary refs log tree commit diff
path: root/Test
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2020-04-27 19:30:40 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2020-05-03 01:27:36 +0000
commitdeca7c928520fba5a73383f1cac0b3ace8e0e45d (patch)
tree9e8e04cd5fbc8297fb033141ed8b0018b1eb2654 /Test
parent4d2bcf2fe7637b641ccde31a8ca7c4875f0699c1 (diff)
downloadzsh-deca7c928520fba5a73383f1cac0b3ace8e0e45d.tar.gz
zsh-deca7c928520fba5a73383f1cac0b3ace8e0e45d.tar.xz
zsh-deca7c928520fba5a73383f1cac0b3ace8e0e45d.zip
45730: _arguments: Add the -0 flag, which makes $opt_args be populated sanely.
Also, write/extend docstrings for sepjoin() and zjoin().
Diffstat (limited to 'Test')
-rw-r--r--Test/Y03arguments.ztst8
1 files changed, 7 insertions, 1 deletions
diff --git a/Test/Y03arguments.ztst b/Test/Y03arguments.ztst
index fa4589374..a815799b3 100644
--- a/Test/Y03arguments.ztst
+++ b/Test/Y03arguments.ztst
@@ -231,9 +231,15 @@
 
  tst_arguments '-a:one: :two' ':descr:{compadd -Q - $opt_args[-a]}'
  comptest $'tst -a 1:x \\2 \t'
-0:opt_args with multiple arguments and quoting of colons and backslashes
+0:opt_args with multiple arguments and quoting of colons and backslashes, part #1: default behaviour
 >line: {tst -a 1:x \2 1\:x:\\2 }{}
 
+ # Same as previous test, except with -0 and (qqqq) added
+ tst_arguments -0 : '-a:one: :two' ':descr:{compadd -Q - ${(qqqq)opt_args[-a]}}'
+ comptest $'tst -a 1:x \\2 \t'
+0:opt_args with multiple arguments and quoting of colons and backslashes, part #2: NUL escaping
+>line: {tst -a 1:x \2 $'1:x\0\\2' }{}
+
  tst_arguments -a -b
  comptest $'tst  rest -\t\C-w\eb\C-b-\t'
 0:option completion with rest arguments on the line but not in the specs