53662: tests: add extra namespace tests

relates to workers/53660
This commit is contained in:
dana
2025-05-24 09:05:35 -05:00
parent e1bb74cfb7
commit 8720885648
2 changed files with 20 additions and 0 deletions

View File

@@ -1,3 +1,7 @@
2025-05-24 dana <dana@dana.is>
* 53662: Test/K02parameter.ztst: add extra namespace tests
2025-05-23 Mikael Magnusson <mikachu@gmail.com>
* 53664: Doc/Zsh/params.yo: remove a slightly confusing example

View File

@@ -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))