Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 63 lines (53 sloc) 1009 Bytes
#!perl
# Copyright (C) 2005-2006, The Parrot Foundation.
use strict;
use warnings;
use lib qw(lib);
use Parrot::Test::Tcl;
use Test::More tests => 4;
tcl_output_is( <<'TCL', <<'OUT', "PIR compiler" );
inline PIR {
.sub test
print "ok\n"
.end
}
TCL
ok
OUT
# XXX can't convert this to a tcl-based test yet, as
# 'end' stops parrot, not just the processing
# for the individual PASM invocation. Leaving it off
# is also bad, as that just keeps walking the bytecode.
tcl_output_is( <<'TCL', <<'OUT', "PASM compiler" );
inline PASM {
print "ok\n"
end
}
TCL
ok
OUT
tcl_output_is( <<'TCL', <<'OUT', "invalid compiler" );
inline JAVA {
System.out.println("mmm, coffee");
}
TCL
invalid language "JAVA" specified
OUT
tcl_output_is( <<'TCL', <<'OUT', "invalid PIR code" );
catch {
inline PIR {
.sub test
say "not ok
.end
}
} err
puts "ok"
TCL
ok
OUT
# Local Variables:
# mode: cperl
# cperl-indent-level: 4
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4:
Something went wrong with that request. Please try again.