| |
33 |
33 |
|
| |
34 |
34 |
set code "=@test_array.test_key;noquote@" |
| |
35 |
35 |
aa_true "Noquote array var name detected" [regexp [template::adp_array_variable_regexp_noquote] $code discard pre arr var] |
| |
36 |
36 |
aa_true "Preceding char is '${pre}'" [string equal "=" $pre] |
| |
37 |
37 |
aa_true "Array name is '${arr}'" \ |
| |
38 |
38 |
[string equal "test_array" $arr] |
| |
39 |
39 |
aa_true "Variable name is '${var}'" \ |
| |
40 |
40 |
[string equal "test_key" $var] |
| |
41 |
41 |
|
| |
42 |
42 |
set code "=@formerror.test_array.test_key;noquote@" |
| |
43 |
43 |
aa_true "Noquote formerror array var name detected" [regexp [template::adp_array_variable_regexp_noquote] $code discard pre arr var] |
| |
44 |
44 |
aa_true "Preceding char is '${pre}'" [string equal "=" $pre] |
| |
45 |
45 |
aa_true "Array name is '${arr}'" \ |
| |
46 |
46 |
[string equal "formerror" $arr] |
| |
47 |
47 |
aa_true "Variable name is '${var}'" \ |
| |
48 |
48 |
[string equal "test_array.test_key" $var] |
| |
49 |
49 |
|
| |
50 |
50 |
|
| |
51 |
51 |
} |
| |
52 |
52 |
} |
| |
|
53 |
|
| |
|
54 |
aa_register_case -cats {api smoke} tcl_to_sql_list { |
| |
|
55 |
Tests the tcl_to_sql_list proc. |
| |
|
56 |
|
| |
|
57 |
@author Torben Brosten |
| |
|
58 |
} { |
| |
|
59 |
aa_equals "parses list of 0 items" [template::util::tcl_to_sql_list [list]] "" |
| |
|
60 |
aa_equals "parses list of 2 or more" [template::util::tcl_to_sql_list [list isn't hess' 'bit 'trippy']] "'isn''t', 'hess''', '''bit', '''trippy'''" |
| |
|
61 |
|
| |
|
62 |
} |