1 source [file dirname [info script]]/testing.tcl
5 # Test the expr-sugar syntax: $(...)
7 test exprsugar-1.1 {Simple operations} {
10 test exprsugar-1.2 {Simple operations} {
13 test exprsugar-1.3 {Simple operations} {
16 test exprsugar-1.4 {Simple operations} {
20 test exprsugar-1.5 {Simple operations} {
23 test exprsugar-1.6 {Simple operations} {
26 test exprsugar-1.7 {Simple operations} {
28 set x $($a in {aa bb cc})
30 test exprsugar-1.8 {Simple operations} {
32 set x $($a ? "yes" : "no")
34 test exprsugar-1.9 {Simple operations} {
39 # expr sugar inside an expression is an error
40 test exprsugar-1.10 {Simple operations} {
41 catch {set x $(1 + $(5 * 7))}
43 test exprsugar-1.11 {Simple operations} {
48 test exprsugar-1.12 {Simple operations} {
51 # This necessary to ensure that things like exit will pass through expr-sugar
52 test exprsugar-1.13 {Non-error return inside expr-sugar} -body {