summaryrefslogtreecommitdiffstats
path: root/Test
diff options
context:
space:
mode:
authordana <dana@dana.is>2026-06-29 23:35:41 -0500
committerdana <dana@dana.is>2026-07-03 06:59:40 -0500
commite9d0e6a8ad252c6eaceaca4301bd2b4d44570574 (patch)
treec48e7fe3f912252ad38c4c553f4ab88a15738392 /Test
parentunposted: _ping: revert previous _arguments fix (diff)
downloadzsh-e9d0e6a8ad252c6eaceaca4301bd2b4d44570574.tar
zsh-e9d0e6a8ad252c6eaceaca4301bd2b4d44570574.tar.gz
zsh-e9d0e6a8ad252c6eaceaca4301bd2b4d44570574.tar.bz2
zsh-e9d0e6a8ad252c6eaceaca4301bd2b4d44570574.tar.lz
zsh-e9d0e6a8ad252c6eaceaca4301bd2b4d44570574.tar.xz
zsh-e9d0e6a8ad252c6eaceaca4301bd2b4d44570574.tar.zst
zsh-e9d0e6a8ad252c6eaceaca4301bd2b4d44570574.zip
54876: comparguments: search more thoroughly for foreign-set options
Diffstat (limited to 'Test')
-rw-r--r--Test/Y03arguments.ztst29
1 files changed, 29 insertions, 0 deletions
diff --git a/Test/Y03arguments.ztst b/Test/Y03arguments.ztst
index b118f2626..14a786709 100644
--- a/Test/Y03arguments.ztst
+++ b/Test/Y03arguments.ztst
@@ -728,6 +728,35 @@ F:should offer both sets of arguments in first case
>NO:{-d}
F:shouldn't offer -t in the first case (with stacked options)
+ tst_arguments -s : - set1 -a -b -c+: --d=: - set2 -e -f
+ comptest $'tst -ab -\t' # stack with known options
+ comptest $'tst -ax -\t' # stack with unknown option
+ comptest $'tst -cx -\t' # short option with same-word optarg
+ comptest $'tst --d=x -\t' # long option with same-word optarg
+0:detection of foreign-set option in stack or with same-word optarg
+>line: {tst -ab -}{}
+>DESCRIPTION:{option}
+>NO:{--d}
+>NO:{-c}
+>line: {tst -ax -}{}
+>DESCRIPTION:{option}
+>NO:{--d}
+>NO:{-a}
+>NO:{-b}
+>NO:{-c}
+>NO:{-e}
+>NO:{-f}
+>line: {tst -cx -}{}
+>DESCRIPTION:{option}
+>NO:{--d}
+>NO:{-a}
+>NO:{-b}
+>line: {tst --d=x -}{}
+>DESCRIPTION:{option}
+>NO:{-a}
+>NO:{-b}
+>NO:{-c}
+
tst_arguments -s '(set-a set--b grp-a grp--b grp-)-a' - set-a -s - set--b -t + grp-a -g + grp--b -h + grp- -i
comptest $'tst -a\t'
0:sets and groups with - in their name