diff options
Diffstat (limited to 'contrib/bluegnu2.0.3/testsuite/T')
-rw-r--r-- | contrib/bluegnu2.0.3/testsuite/T/env.exp | 12 | ||||
-rw-r--r-- | contrib/bluegnu2.0.3/testsuite/T/env.iexp | 48 | ||||
-rw-r--r-- | contrib/bluegnu2.0.3/testsuite/T/foo.exp | 5 | ||||
-rw-r--r-- | contrib/bluegnu2.0.3/testsuite/T/subT/test_002.exp | 20 | ||||
-rw-r--r-- | contrib/bluegnu2.0.3/testsuite/T/test_000.exp | 8 | ||||
-rw-r--r-- | contrib/bluegnu2.0.3/testsuite/T/test_001.exp | 19 | ||||
-rw-r--r-- | contrib/bluegnu2.0.3/testsuite/T/test_002.exp | 22 | ||||
-rw-r--r-- | contrib/bluegnu2.0.3/testsuite/T/test_003.exp | 3 | ||||
-rw-r--r-- | contrib/bluegnu2.0.3/testsuite/T/test_004.exp | 3 |
9 files changed, 140 insertions, 0 deletions
diff --git a/contrib/bluegnu2.0.3/testsuite/T/env.exp b/contrib/bluegnu2.0.3/testsuite/T/env.exp new file mode 100644 index 0000000..ce48f79 --- /dev/null +++ b/contrib/bluegnu2.0.3/testsuite/T/env.exp @@ -0,0 +1,12 @@ + +uplevel #0 { + foreach var [lsort [info globals]] { + if {[array exists $var]} { + foreach index [lsort [array names $var]] { + puts "${var}($index)=[set ${var}($index)]" + } + } else { + puts "$var=[set $var]" + } + } +} diff --git a/contrib/bluegnu2.0.3/testsuite/T/env.iexp b/contrib/bluegnu2.0.3/testsuite/T/env.iexp new file mode 100644 index 0000000..ca29e5f --- /dev/null +++ b/contrib/bluegnu2.0.3/testsuite/T/env.iexp @@ -0,0 +1,48 @@ + +puts "======= Environment (Start) =======" + +foreach item [lsort [array names env]] { + if [catch {puts " env($item)=$env($item)"} szErrMsg] { + puts "******* >> msg : $szErrMsg" + puts "******* >> errorInfo: [uplevel #0 set errorInfo]" + puts "******* >> errorCode: [uplevel #0 set errorCode]" + } +} + +foreach info [list {info locals} \ + {info globals} {uplevel #0 info globals} \ + {info vars}] { + puts "=== Command: $info" + foreach item [lsort [eval $info]] { + if [catch {puts " $item=>[eval set $item]<"} szErrMsg] { + if [regexp "variable is array" $szErrMsg] { + foreach elem [lsort [array names $item]] { + puts " ${item}($elem)=>[set ${item}($elem)]<" + } + } else { + puts "******* >> msg : $szErrMsg" + puts "******* >> errorInfo: [uplevel #0 set errorInfo]" + puts "******* >> errorCode: [uplevel #0 set errorCode]" + } + } + } +} + +foreach info [list {namespace all} \ + {namespace children} {namespace parent} \ + classes commands context level library locals \ + objects patchlevel procs script tclversion] { + puts "=== info $info" + foreach item [lsort [eval info $info]] { + puts " $item" + } +} + +puts "argv: [set argv]" +puts "szTestName: [set szTestName]" +catch {puts "lTestName : $lTestName"} +$szTestName pass +puts [$szTestName <<] + +#runtest ::E0 env.iexp +puts "======= Environment (End) =======" diff --git a/contrib/bluegnu2.0.3/testsuite/T/foo.exp b/contrib/bluegnu2.0.3/testsuite/T/foo.exp new file mode 100644 index 0000000..c5f9770 --- /dev/null +++ b/contrib/bluegnu2.0.3/testsuite/T/foo.exp @@ -0,0 +1,5 @@ +appendQueue env.iexp +appendQueue ../tools/env.exp +appendQueue env.iexp +appendQueue ../tools/env.exp +appendQueue ../tools/foo.exp diff --git a/contrib/bluegnu2.0.3/testsuite/T/subT/test_002.exp b/contrib/bluegnu2.0.3/testsuite/T/subT/test_002.exp new file mode 100644 index 0000000..a887fc9 --- /dev/null +++ b/contrib/bluegnu2.0.3/testsuite/T/subT/test_002.exp @@ -0,0 +1,20 @@ + +puts "Test test_002.exp: level [info level]" +puts "szTestName: [set szTestName]" +puts "lTestName : $lTestName" + +namespace ::Common { + if [info exists i] { + if {[expr $i % 2]} { + puts " Remainder is 1 >$i<" + incr i + return + } else { + puts " Zero remainder >$i<" + incr i + } + puts " === End: $env(SHELL)" + } else { + puts "#### i doesn't exists" + } +} diff --git a/contrib/bluegnu2.0.3/testsuite/T/test_000.exp b/contrib/bluegnu2.0.3/testsuite/T/test_000.exp new file mode 100644 index 0000000..9548c1c --- /dev/null +++ b/contrib/bluegnu2.0.3/testsuite/T/test_000.exp @@ -0,0 +1,8 @@ + +namespace Common { + private variable iCount 0 +} + +verbose "prepeding test_001.exp" +prependQueue test_001.exp +pass "test_000.exp" diff --git a/contrib/bluegnu2.0.3/testsuite/T/test_001.exp b/contrib/bluegnu2.0.3/testsuite/T/test_001.exp new file mode 100644 index 0000000..0ecd02b --- /dev/null +++ b/contrib/bluegnu2.0.3/testsuite/T/test_001.exp @@ -0,0 +1,19 @@ + +verbose "Test test_001.exp: level [info level]" +verbose "Global tools: [uplevel #0 set szCurrentTestDirectory]" + +appendQueue test_003.exp=1 +prependQueue test_003.exp=2 test_003.exp=3 +verbose "Context: [info context]" +runtest test_003.exp=R0 +appendQueue test_003.exp=A0 +prependQueue test_003.exp=A2 test_003.exp=A3 + +namespace Common { + incr iCount + verbose "Counter is $iCount" + if {$iCount < 5} { + prependQueue test_001.exp + } + pass "test_001.exp: iCount - $iCount" +} diff --git a/contrib/bluegnu2.0.3/testsuite/T/test_002.exp b/contrib/bluegnu2.0.3/testsuite/T/test_002.exp new file mode 100644 index 0000000..e1a185a --- /dev/null +++ b/contrib/bluegnu2.0.3/testsuite/T/test_002.exp @@ -0,0 +1,22 @@ + +verbose "Test test_002.exp: level [info level]" +verbose "szTestName: [set szTestName]" +verbose "lTestName : $lTestName" +pass +namespace ::Common { + if [info exists i] { + if {[expr $i % 2]} { + verbose " Remainder is 1 >$i<" + incr i + pass "karel" + return + } else { + verbose " Zero remainder >$i<" + fail "pieter" + incr i + } + verbose " === End: $env(SHELL)" + } else { + verbose "#### i doesn't exists" + } +} diff --git a/contrib/bluegnu2.0.3/testsuite/T/test_003.exp b/contrib/bluegnu2.0.3/testsuite/T/test_003.exp new file mode 100644 index 0000000..32c0481 --- /dev/null +++ b/contrib/bluegnu2.0.3/testsuite/T/test_003.exp @@ -0,0 +1,3 @@ + +verbose "t003.exp == $lArgs" +pass "t003.exp == $lArgs"
\ No newline at end of file diff --git a/contrib/bluegnu2.0.3/testsuite/T/test_004.exp b/contrib/bluegnu2.0.3/testsuite/T/test_004.exp new file mode 100644 index 0000000..6cda091 --- /dev/null +++ b/contrib/bluegnu2.0.3/testsuite/T/test_004.exp @@ -0,0 +1,3 @@ + +puts " in test 4" +pass "test 4"
\ No newline at end of file |