Skip to content

Commit

Permalink
minimal test of the bundled Winxed
Browse files Browse the repository at this point in the history
  • Loading branch information
NotFound committed Jul 6, 2011
1 parent bba5080 commit 96fac30
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 0 deletions.
1 change: 1 addition & 0 deletions MANIFEST
Expand Up @@ -1678,6 +1678,7 @@ t/examples/shootout.t [test]
t/examples/streams.t [test]
t/examples/subs.t [test]
t/examples/tutorial.t [test]
t/ext/winxed/compreg.t [test]
t/harness [test]
t/harness.pir [test]
t/include/fp_equality.t [test]
Expand Down
1 change: 1 addition & 0 deletions lib/Parrot/Harness/DefaultTests.pm
Expand Up @@ -89,6 +89,7 @@ our @EXPORT_OK = qw(
t/dynoplibs/*.t
t/dynpmc/*.t
t/library/*.t
t/ext/winxed/*.t
t/tools/*.t
t/profiling/*.t
);
Expand Down
50 changes: 50 additions & 0 deletions t/ext/winxed/compreg.t
@@ -0,0 +1,50 @@
#!./parrot
# Copyright (C) 2011, Parrot Foundation.

=head1 NAME

t/ext/winxed/compreg.t - test winxed compreg.

=head1 SYNOPSIS

% prove t/ext/winxed/compreg.t

=head1 DESCRIPTION

Tests using winxed compreg.

=cut

.sub main :main
.include 'test_more.pir'
plan(2)

.local pmc wcomp
.local int r

load_language 'winxed'
wcomp = compreg 'winxed'
r = isnull wcomp
is(r, 0, "winxed compreg is not null")

.local string source
.local pmc result

source = <<'SOURCE'
function main(argv)
{
string s = "hello";
say(s);
}
SOURCE

result = wcomp.'compile'(source, "pir" :named("target"))
like(result, "hello", "pir geenrated from a simple source looks good")

.end

# Local Variables:
# mode: pir
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4 ft=pir:

0 comments on commit 96fac30

Please sign in to comment.