From 87208856489e87a969263097f5175aa7e1184d93 Mon Sep 17 00:00:00 2001 From: dana Date: Sat, 24 May 2025 09:05:35 -0500 Subject: 53662: tests: add extra namespace tests relates to workers/53660 --- Test/K02parameter.ztst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'Test/K02parameter.ztst') 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)) -- cgit v1.2.3-70-g09d2