Author: coke
Date: Mon Aug 8 08:26:32 2005
New Revision: 8868
Modified:
trunk/languages/tcl/t/cmd_global.t
Log:
tcl: add more tests for [global]
Modified: trunk/languages/tcl/t/cmd_global.t
==============================================================================
--- trunk/languages/tcl/t/cmd_global.t (original)
+++ trunk/languages/tcl/t/cmd_global.t Mon Aug 8 08:26:32 2005
@@ -2,7 +2,7 @@
use strict;
use lib qw(tcl/t t . ../lib ../../lib ../../../lib);
-use Parrot::Test tests => 3;
+use Parrot::Test tests => 5;
use Test::More;
use vars qw($TODO);
@@ -39,3 +39,29 @@ language_output_is("tcl",<<'TCL',<<OUT,"
TCL
1 2 3
OUT
+
+TODO: {
+
+local $TODO= "global doesn't deal if we haven't defined the global yet.";
+
+language_output_is("tcl",<<'TCL',<<OUT,"vivify global");
+proc j {} {
+ global a
+ set a 1
+}
+j
+puts $a
+TCL
+1
+OUT
+}
+
+language_output_is("tcl",<<'TCL',<<OUT,"nonvivifying global");
+proc j {} {
+ global a
+}
+j
+puts $a
+TCL
+can't read "a": no such variable
+OUT