diff options
author | dgp <dgp@noemail.net> | 2003-07-24 16:05:22 (GMT) |
---|---|---|
committer | dgp <dgp@noemail.net> | 2003-07-24 16:05:22 (GMT) |
commit | def4d890d0cfe499ae2aae2dcc3081039df74236 (patch) | |
tree | 829c6228c7d8db111e9b0b193de20a6c182b21be /tests/async.test | |
parent | 10023ed86915c455b083d924c9b304f436d815ac (diff) | |
download | tcl-def4d890d0cfe499ae2aae2dcc3081039df74236.zip tcl-def4d890d0cfe499ae2aae2dcc3081039df74236.tar.gz tcl-def4d890d0cfe499ae2aae2dcc3081039df74236.tar.bz2 |
* tests/async.test: Added several tests that demonstrate Tcl
* tests/basic.test: Bug 489537, Tcl's longstanding failure to
* tests/dict.test: properly quote any leading '#' character
* tests/dstring.test: when generating the string rep of a list
* tests/list.test: so that the comment-power of that character
* tests/parse.test: is hidden from any [eval], in order to
* tests/util.test: satisfy the documentation that [list] does
[eval]-safe quoting.
FossilOrigin-Name: 03d3df98ff7cdfa4ebd84d70cf3d5ecb99bab3c5
Diffstat (limited to 'tests/async.test')
-rw-r--r-- | tests/async.test | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/async.test b/tests/async.test index 307a707..af63413 100644 --- a/tests/async.test +++ b/tests/async.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: async.test,v 1.5 2000/04/10 17:18:56 ericm Exp $ +# RCS: @(#) $Id: async.test,v 1.6 2003/07/24 16:05:24 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -42,10 +42,17 @@ proc async3 {result code} { set aresult "test pattern" return -code $code $result } +proc \# {result code} { + global aresult acode + set aresult $result + set acode $code + return "comment quoting" +} set handler1 [testasync create async1] set handler2 [testasync create async2] set handler3 [testasync create async3] +set handler4 [testasync create #] test async-1.1 {basic async handlers} { set aresult xxx set acode yyy @@ -78,6 +85,12 @@ test async-1.6 {basic async handlers} { set aresult xxx list [catch {testasync mark $handler3 "foobar" 1} msg] $msg $aresult } {1 foobar {test pattern}} +test async-1.7 {basic async handlers} { + set aresult xxx + set acode yyy + list [catch {testasync mark $handler4 "original" 0} msg] $msg \ + $acode $aresult +} {0 {comment quoting} 0 original} proc mult1 {result code} { global x |