diff options
Diffstat (limited to 'tests/misc.test')
-rw-r--r-- | tests/misc.test | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/misc.test b/tests/misc.test index 804e456..eda2879 100644 --- a/tests/misc.test +++ b/tests/misc.test @@ -216,4 +216,25 @@ test lindex-1.20 "unary plus" { lindex {a b c} +2 } c +test incr-1.1 "incr unset" { + unset -nocomplain a + incr a + set a +} 1 + +test incr-1.2 "incr, incr unset" { + incr a +} 2 + +test incr-1.3 "incr unset array element" { + unset -nocomplain a + incr a(2) + set a(2) +} 1 + +test incr-1.4 "incr array element - shimmering" { + set b "$a(2)-test" + incr a(2) +} 2 + testreport |