Skip to content
This repository
tree: 96fac305d0
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 51 lines (35 sloc) 0.821 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 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:
Something went wrong with that request. Please try again.