diff options
| author | dana <dana@dana.is> | 2025-05-24 09:05:35 -0500 |
|---|---|---|
| committer | dana <dana@dana.is> | 2025-05-24 09:07:55 -0500 |
| commit | 87208856489e87a969263097f5175aa7e1184d93 (patch) | |
| tree | a6d6b871629df8a2087ee3d5a1721017e537287d /Test | |
| parent | 53664: remove a slightly confusing example (diff) | |
| download | zsh-87208856489e87a969263097f5175aa7e1184d93.tar zsh-87208856489e87a969263097f5175aa7e1184d93.tar.gz zsh-87208856489e87a969263097f5175aa7e1184d93.tar.bz2 zsh-87208856489e87a969263097f5175aa7e1184d93.tar.lz zsh-87208856489e87a969263097f5175aa7e1184d93.tar.xz zsh-87208856489e87a969263097f5175aa7e1184d93.tar.zst zsh-87208856489e87a969263097f5175aa7e1184d93.zip | |
53662: tests: add extra namespace tests
relates to workers/53660
Diffstat (limited to 'Test')
| -rw-r--r-- | Test/K02parameter.ztst | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Test/K02parameter.ztst b/Test/K02parameter.ztst index 0b1a8dd4a..f9f434b36 100644 --- a/Test/K02parameter.ztst +++ b/Test/K02parameter.ztst @@ -106,11 +106,21 @@ F:Braces are required 0:Parse without leading dot (future proofing) >empty test + .k02.a=b + k02.a=c + print ${.k02.a} ${k02.a} +0:With and without leading dot are distinct +>b c + .k=OK print ${.k} 0:Bare namespace is usable (ksh compatibility) >OK + ..k=OK +127:Bare namespace is not usable with two dots +?(eval):1: command not found: ..k=OK + .k.=empty 1:Namespace must precede an identifier, assignment ?(eval):1: not an identifier: .k. @@ -147,6 +157,12 @@ F:Braces are required 1:Identifier starting with a digit must be all digits, reference ?(eval):1: bad substitution + .n.s.k=OK + print ${.n.s.k} +127:Nested namespace is not usable +?(eval):1: command not found: .n.s.k=OK +?(eval):2: bad substitution + integer .var.d=0 float .var.f=.2 print $((.var.x = ++.var.d - -.var.f)) |
