issue238.t 534 B

123456789101112131415161718192021222324252627282930313233
  1. #! /usr/bin/env perl
  2. # http://code.google.com/p/perl-compiler/issues/detail?id=238 239
  3. # format STDOUT: t/CORE/comp/form_scope.t + t/CORE/io/defout.t
  4. use strict;
  5. BEGIN {
  6. unshift @INC, 't';
  7. require "test.pl";
  8. }
  9. use Test::More tests => 2;
  10. ctestok(1,'C,-O3','ccode238i',<<'EOF','#238 format STDOUT');
  11. sub f ($);
  12. sub f ($) {
  13. my $test = $_[0];
  14. write;
  15. format STDOUT =
  16. ok @<<<<<<<
  17. $test
  18. .
  19. }
  20. f('');
  21. EOF
  22. ctestok(2,'C,-O3','ccode238i',<<'EOF','TODO #239 format STDOUT');
  23. my $x="1";
  24. format STDOUT =
  25. ok @<<<<<<<
  26. $x
  27. .
  28. write;print "\n";
  29. EOF