| 1 | #!perl |
|---|
| 2 | # Copyright (C) 2001-2005, The Perl Foundation. |
|---|
| 3 | # $Id: spill.t 22180 2007-10-17 19:33:17Z allison $ |
|---|
| 4 | |
|---|
| 5 | use strict; |
|---|
| 6 | use warnings; |
|---|
| 7 | |
|---|
| 8 | use lib qw( . lib ../lib ../../lib ); |
|---|
| 9 | use Parrot::Test tests => 1; |
|---|
| 10 | |
|---|
| 11 | # Odd communication with Parrot::Test. |
|---|
| 12 | my $args = $ENV{TEST_PROG_ARGS} || ''; |
|---|
| 13 | $args .= ' ' |
|---|
| 14 | if $args; |
|---|
| 15 | $args .= '--run-exec'; |
|---|
| 16 | local $ENV{TEST_PROG_ARGS} = $args; |
|---|
| 17 | |
|---|
| 18 | pir_output_is( <<'CODE', <<'OUTPUT', ".const of null string" ); |
|---|
| 19 | # NB: This only fails if compiled. |
|---|
| 20 | .sub 'main' |
|---|
| 21 | .const .String empty = '' |
|---|
| 22 | print empty |
|---|
| 23 | print "ok\n" |
|---|
| 24 | .end |
|---|
| 25 | CODE |
|---|
| 26 | ok |
|---|
| 27 | OUTPUT |
|---|