#!/usr/bin/perl

use strict;
use lib qw(tcl/lib ./lib ../lib ../../lib ../../../lib);
use Parrot::Test tests => 4;
use Test::More;

language_output_is("tcl",<<'TCL',<<OUT,"set");
 set a 2
 puts $a
TCL
2
OUT

language_output_is("tcl",<<'TCL',<<OUT,"get");
 set a 1
 puts [set a]
TCL
1
OUT

language_output_is("tcl",<<'TCL',<<OUT,"missing global");
 puts $a
TCL
can't read "a": no such variable
OUT

language_output_is("tcl",<<'TCL',<<OUT,"not an array");
 set b 1
 set b(c) 2
TCL
can't set "b(c)": variable isn't array
OUT

#!/usr/bin/perl

use strict;
use lib qw(tcl/lib ./lib ../lib ../../lib ../../../lib);
use Parrot::Test tests => 5;
use Test::More;

language_output_is("tcl",<<'TCL',<<OUT,"set");
 set a 2
 puts $a
TCL
2
OUT

language_output_is("tcl",<<'TCL',<<OUT,"get");
 set a 1
 puts [set a]
TCL
1
OUT

language_output_is("tcl",<<'TCL',<<OUT,"missing global");
 puts $a
TCL
can't read "a": no such variable
OUT

language_output_is("tcl",<<'TCL',<<OUT,"not an array");
 set b 1
 set b(c) 2
TCL
can't set "b(c)": variable isn't array
OUT

language_output_is("tcl", <<'TCL', <<'OUT', "array");
  array set test {4 ok}
  puts [set {test(4)}]
TCL
ok
OUT

Add a passing array test for [set].
[tcl]: Add a passing array test for [set].

git-svn-id: 6e74a02f85675cec270f5d931b0f6998666294a3@13212 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
