summaryrefslogtreecommitdiffstats
path: root/tests/async.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2003-07-24 16:05:22 (GMT)
committerdgp <dgp@users.sourceforge.net>2003-07-24 16:05:22 (GMT)
commitdb3db9df91cdc7d1b0bdac6c9c927765ce9afd95 (patch)
tree829c6228c7d8db111e9b0b193de20a6c182b21be /tests/async.test
parent69bc2d2dcd6bd96a75ea42e0fdb1c23fc1054390 (diff)
downloadtcl-db3db9df91cdc7d1b0bdac6c9c927765ce9afd95.zip
tcl-db3db9df91cdc7d1b0bdac6c9c927765ce9afd95.tar.gz
tcl-db3db9df91cdc7d1b0bdac6c9c927765ce9afd95.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.
Diffstat (limited to 'tests/async.test')
-rw-r--r--tests/async.test15
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