issue237.t 430 B

123456789101112131415
  1. #! /usr/bin/env perl
  2. # http://code.google.com/p/perl-compiler/issues/detail?id=237
  3. # NULL in strings (pv->PVX problem)
  4. use strict;
  5. BEGIN {
  6. unshift @INC, 't';
  7. require "test.pl";
  8. }
  9. use Test::More tests => 2;
  10. my $cmt = '#237 NULL in strings';
  11. my $script = 'print "\000\000\000\000_"';
  12. my $exp = "^\000\000\000\000_\$";
  13. ctest(1, $exp, 'C,-O3', 'ccode237i', $script, 'C '.$cmt);
  14. plctest(2, $exp, 'ccode237i', $script, "BC ".$cmt);