Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: |