1 source [file dirname [info script]]/testing.tcl
4 testCmdConstraints lambda
6 test exists-1.1 "Exists var" {
11 test exists-1.2 "Exists var" {
16 test exists-1.3 "Exists -var" {
20 test exists-1.4 "Exists -var" {
24 test exists-1.5 "Exists in proc" {
25 proc a {name} { exists $name }
29 test exists-1.6 "Exists in proc" {
33 test exists-1.7 "Exists in proc" {
37 test exists-1.8 "Exists in proc" {
41 test exists-1.9 "Exists -proc" {
45 test exists-1.10 "Exists -proc" {
49 test exists-1.11 "Exists -proc" {
53 test exists-1.12 "Exists -command" {
57 test exists-1.13 "Exists -command" {
61 test exists-1.14 "Exists -command" {
65 test exists-1.15 "Exists local lambda after exit" lambda {
67 local lambda {} {dummy}
72 test exists-1.16 "Exists local lambda" lambda {
74 exists -proc [local lambda {} {dummy}]
79 test exists-1.17 {exists usage} -body {
81 } -returnCodes error -result {bad option "-dummy": must be -alias, -command, -proc, or -var}
83 test exists-1.18 {exists usage} -body {
85 } -returnCodes error -result {wrong # args: should be "exists ?option? name"}