Skip to content

Commit 3a5ff82

Browse files
committed
commands: fix validation of string and zlib
1 parent 9c939fa commit 3a5ff82

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/tclint/commands/builtin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1155,7 +1155,7 @@ def _while(args, parser):
11551155
"source": check_count("source", 1, 3),
11561156
"split": check_count("split", 1, 2),
11571157
# TODO: check subcommands
1158-
"string": check_count("string", 2, None),
1158+
"string": check_count("string", 1, None),
11591159
"subst": check_count("subst", 1, 4),
11601160
"switch": _switch,
11611161
"tailcall": check_count("tailcall", 1, None),
@@ -1201,5 +1201,5 @@ def _while(args, parser):
12011201
]
12021202
},
12031203
# TODO: check subcommands
1204-
"zlib": check_count("zlib", 3, None),
1204+
"zlib": check_count("zlib", 2, None),
12051205
})

tests/commands/test_builtins.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
("foreach", False),
2222
(r"foreach $iters {}", False),
2323
("after cancel", False),
24+
('zlib decompress "hello"', True),
25+
("string cat", True),
2426
],
2527
)
2628
def test_validation(command, valid):

0 commit comments

Comments
 (0)