Front page | perl.cvs.parrot |
Postings from December 2008
[svn:parrot] r33570 - branches/testparrottest/t/perl
From:
jkeenan
Date:
December 6, 2008 09:05
Subject:
[svn:parrot] r33570 - branches/testparrottest/t/perl
Message ID:
20081206170542.032DECB9AF@x12.develooper.com
Author: jkeenan
Date: Sat Dec 6 09:05:41 2008
New Revision: 33570
Modified:
branches/testparrottest/t/perl/Parrot_Test.t
Log:
Add tests for 3 c_output* test functions.
Modified: branches/testparrottest/t/perl/Parrot_Test.t
==============================================================================
--- branches/testparrottest/t/perl/Parrot_Test.t (original)
+++ branches/testparrottest/t/perl/Parrot_Test.t Sat Dec 6 09:05:41 2008
@@ -30,7 +30,7 @@
plan( skip_all => "Test::Builder::Tester not installed\n" );
exit 0;
}
- plan( tests => 97 );
+ plan( tests => 100 );
}
use lib qw( . lib ../lib ../../lib );
@@ -229,9 +229,9 @@
OUTPUT
test_test($desc);
-# The exact error output for pir_output_isnt() depends on the version of Test::Builder.
-# So, in order to avoid version dependent failures, be content with checking the
-# standard output.
+# The exact error output for pir_output_isnt() depends on the version of
+# Test::Builder. So, in order to avoid version dependent failures, be content
+# with checking the standard output.
$desc = 'pir_output_isnt: failure';
test_out("not ok 1 - $desc");
test_fail(+10);
@@ -484,6 +484,9 @@
undef $chdir;
+SKIP: {
+ skip 'feature not DWIMming even though test passes',
+ 1;
$desc = '';
test_out("ok 1 - $desc");
pasm_output_is( <<'CODE', <<'OUTPUT', $desc );
@@ -493,6 +496,58 @@
foo
OUTPUT
test_test($desc);
+}
+
+$desc = 'C: hello world';
+test_out("ok 1 - $desc");
+c_output_is( <<'CODE', <<'OUTPUT', $desc );
+ #include <stdio.h>
+ #include <stdlib.h>
+
+ int
+ main(int argc, char* argv[])
+ {
+ printf("Hello, World!\n");
+ exit(0);
+ }
+CODE
+Hello, World!
+OUTPUT
+test_test($desc);
+
+$desc = 'C: isnt hello world';
+test_out("ok 1 - $desc");
+c_output_isnt( <<'CODE', <<'OUTPUT', $desc );
+ #include <stdio.h>
+ #include <stdlib.h>
+
+ int
+ main(int argc, char* argv[])
+ {
+ printf("Hello, World!\n");
+ exit(0);
+ }
+CODE
+Is Not Hello, World!
+OUTPUT
+test_test($desc);
+
+$desc = 'C: like hello world';
+test_out("ok 1 - $desc");
+c_output_like( <<'CODE', <<'OUTPUT', $desc );
+ #include <stdio.h>
+ #include <stdlib.h>
+
+ int
+ main(int argc, char* argv[])
+ {
+ printf("Hello, World!\n");
+ exit(0);
+ }
+CODE
+/Hello, World/
+OUTPUT
+test_test($desc);
# Local Variables:
# mode: cperl
-
[svn:parrot] r33570 - branches/testparrottest/t/perl
by jkeenan