develooper Front page | perl.cvs.parrot | Postings from December 2008

[svn:parrot] r33572 - in branches/testparrottest: lib/Parrot t/perl

From:
jkeenan
Date:
December 6, 2008 09:21
Subject:
[svn:parrot] r33572 - in branches/testparrottest: lib/Parrot t/perl
Message ID:
20081206172147.B6639CB9AF@x12.develooper.com
Author: jkeenan
Date: Sat Dec  6 09:21:46 2008
New Revision: 33572

Modified:
   branches/testparrottest/lib/Parrot/Test.pm
   branches/testparrottest/t/perl/Parrot_Test.t

Log:
Add a 'c_output_unlike' test function.

Modified: branches/testparrottest/lib/Parrot/Test.pm
==============================================================================
--- branches/testparrottest/lib/Parrot/Test.pm	(original)
+++ branches/testparrottest/lib/Parrot/Test.pm	Sat Dec  6 09:21:46 2008
@@ -662,9 +662,10 @@
 
     ##### E: C test map #####
     my %c_test_map = (
-        c_output_is   => 'is_eq',
-        c_output_isnt => 'isnt_eq',
-        c_output_like => 'like'
+        c_output_is     => 'is_eq',
+        c_output_isnt   => 'isnt_eq',
+        c_output_like   => 'like',
+        c_output_unlike => 'unlike',
     );
 
     foreach my $func ( keys %c_test_map ) {

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:21:46 2008
@@ -30,7 +30,7 @@
         plan( skip_all => "Test::Builder::Tester not installed\n" );
         exit 0;
     }
-    plan( tests => 100 );
+    plan( tests => 101 );
 }
 
 use lib qw( . lib ../lib ../../lib );
@@ -549,6 +549,23 @@
 OUTPUT
 test_test($desc);
 
+$desc = 'C:  unlike hello world';
+test_out("ok 1 - $desc");
+c_output_unlike( <<'CODE', <<'OUTPUT', $desc );
+    #include <stdio.h>
+    #include <stdlib.h>
+
+    int
+    main(int argc, char* argv[])
+    {
+        printf("Hello, World!\n");
+        exit(0);
+    }
+CODE
+/foobar/
+OUTPUT
+test_test($desc);
+
 # Local Variables:
 #   mode: cperl
 #   cperl-indent-level: 4



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About