/
Phc.pm
48 lines (34 loc) · 991 Bytes
/
Phc.pm
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
# Copyright (C) 2006-2007, The Perl Foundation.
package Parrot::Test::Pipp::Phc;
# pragmata
use strict;
use warnings;
use base 'Parrot::Test::Pipp';
# Generate output_is(), output_isnt() and output_like() in current package.
Parrot::Test::generate_languages_functions();
sub get_out_fn {
my $self = shift;
my ( $count, $options ) = @_;
return Parrot::Test::per_test( '_phc.out', $count );
}
# Use PHP on the command line
sub get_test_prog {
my $self = shift;
my ( $count, $options ) = @_;
my $lang_fn = Parrot::Test::per_test( '.php', $count );
$lang_fn =~ s!^pipp/!!; # fix for unified languages testing
return "$self->{relpath}/parrot $self->{relpath}/languages/pipp/pipp.pbc --variant=phc $lang_fn";
}
# never skip the reference implementation
sub skip_why {
my $self = shift;
my ($options) = @_;
return;
}
1;
# Local Variables:
# mode: cperl
# cperl-indent-level: 4
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4: