diff options
author | Steve Bennett <steveb@workware.net.au> | 2022-07-25 22:36:56 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2022-07-25 22:45:36 +1000 |
commit | 6164aaf837de4d43b0e797be380a9ad15a30c1ae (patch) | |
tree | fc86e9024024ee366a6ae620a970454b2bc4613d /tests/array.test | |
parent | 8e7fb137ff0dddda57390a2161a20f532a7fa6ca (diff) | |
download | jimtcl-6164aaf837de4d43b0e797be380a9ad15a30c1ae.zip jimtcl-6164aaf837de4d43b0e797be380a9ad15a30c1ae.tar.gz jimtcl-6164aaf837de4d43b0e797be380a9ad15a30c1ae.tar.bz2 |
unset: don't return a result with -nocomplain
unset -nocomplain abc(missing)
was still returning an error message, but as
a normal return. It should return an empty result.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'tests/array.test')
-rw-r--r-- | tests/array.test | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/array.test b/tests/array.test index 7581de2..8035d35 100644 --- a/tests/array.test +++ b/tests/array.test @@ -131,6 +131,12 @@ test array-1.23 "array exists non-array" -body { array exists x } -result {0} +test array-1.24 "unset -nocomplain missing array element" -body { + unset -nocomplain a + set a(1) one + unset -nocomplain a(2) +} -result {} + test array-2.1 {array -help} -constraints jim -body { array -help } -match glob -result {Usage: "array command ... ", where command is one of: *} |