#!/usr/bin/perl

use strict;
use lib qw(tcl/t t . ../lib ../../lib ../../../lib);
use Parrot::Test tests => 5;
use vars qw($TODO);

my($tcl,$expected);

$tcl = <<'EOTCL';
 proc me {} {
  puts 2
 }
 me
EOTCL
$expected = "2\n";
language_output_is("tcl",$tcl,$expected,"noarg");

$tcl = <<'EOTCL';
 proc me {a} {
  puts $a
 }
 me 2
EOTCL
$expected = "2\n";
language_output_is("tcl",$tcl,$expected,"onearg");

$tcl = <<'EOTCL';
 proc me {a b} {
  puts $a
  puts $b
 }
 me 2  3
EOTCL
$expected = "2\n3\n";
language_output_is("tcl",$tcl,$expected,"twoarg");


TODO: {
local $TODO = "not done yet.";

$tcl = <<'EOTCL';
 proc me {a args} {
  puts $a
  puts $args
 }
 me 2 3 4 5 6
EOTCL
$expected = "2\n3 4 5 6\n";
language_output_is("tcl",$tcl,$expected,"vararg");

$tcl = <<'EOTCL';
 proc me {{a 2}} {
  puts $a
 }
 me
EOTCL
$expected = "2\n";
language_output_is("tcl",$tcl,$expected,"defaultarg");

}


#!/usr/bin/perl

use strict;
use lib qw(tcl/t t . ../lib ../../lib ../../../lib);
use Parrot::Test tests => 5;
use vars qw($TODO);

my($tcl,$expected);

language_output_is("tcl",<<'TCL',<<OUT,"noarg");
 proc me {} {
  puts 2
 }
 me
TCL
2
OUT

language_output_is("tcl",<<'TCL',<<OUT,"onearg");
 proc me {a} {
  puts $a
 }
 me 2
TCL
2
OUT

language_output_is("tcl",<<'TCL',<<OUT,"twoarg");
 proc me {a b} {
  puts $a
  puts $b
 }
 me 2  3
TCL
2
3
OUT

TODO: {
local $TODO = "not done yet, but doable";

language_output_is("tcl",<<'TCL',<<OUT,"vararg");
 proc me {a args} {
  puts $a
  puts $args
 }
 me 2 3 4 5 6
TCL
2
3 4 5 6
OUT
}

TODO: {
local $TODO = "Not doable until multiple-level lists are usable";
language_output_is("tcl",<<'TCL',<<OUT,"default args");
 proc me {{a 2}} {
  puts $a
 }
 me
TCL
2
OUT
}

Use standard test format, per TODO
Use standard test format, per TODO


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