Author: bernhard
Date: Tue Oct 11 15:39:36 2005
New Revision: 9462

Added:
   trunk/examples/pir/md5sum.pir
      - copied, changed from r9459, trunk/examples/assembly/md5sum.imc
Removed:
   trunk/examples/assembly/md5sum.imc
Modified:
   trunk/MANIFEST
   trunk/t/benchmarks.t
   trunk/t/examples/pir.t
   trunk/t/tools/pbc_merge.t
Log:
Strictify  t/tools/pbc_merge.t  
Move assembly/md5sum.imc to pir/md5sum.pir


Modified: trunk/MANIFEST
==============================================================================
--- trunk/MANIFEST      (original)
+++ trunk/MANIFEST      Tue Oct 11 15:39:36 2005
@@ -459,7 +459,6 @@ examples/assembly/lexical3.pasm         
 examples/assembly/life.pasm                       [main]doc
 examples/assembly/local_label.pasm                [main]doc
 examples/assembly/mandel.pasm                     [main]doc
-examples/assembly/md5sum.imc                      [main]doc
 examples/assembly/mops.pasm                       [main]doc
 examples/assembly/mops_p.pasm                     [main]doc
 examples/assembly/nanoforth.pasm                  [main]doc
@@ -601,6 +600,7 @@ examples/mops/mops.rb                   
 examples/mops/mops.scheme                         [main]doc
 examples/pasm/fact.pasm                           [main]doc
 examples/pir/mandel.pir                           [main]doc
+examples/pir/md5sum.pir                           [main]doc
 examples/pir/sudoku.pir                           [main]doc
 examples/pni/PQt.C                                [main]doc
 examples/pni/QtHelloWorld.pasm                    [main]doc

Copied: trunk/examples/pir/md5sum.pir (from r9459, 
trunk/examples/assembly/md5sum.imc)
==============================================================================
--- trunk/examples/assembly/md5sum.imc  (original)
+++ trunk/examples/pir/md5sum.pir       Tue Oct 11 15:39:36 2005
@@ -5,11 +5,11 @@
 
 =head1 NAME
 
-examples/assembly/md5sum.imc - calculate MD5 checksums
+examples/pir/md5sum.imc - calculate MD5 checksums
 
 =head1 SYNOPSIS
 
-    % ./parrot examples/assembly/md5sum.imc filename [filename ...]
+    % ./parrot examples/pir/md5sum.imc filename [filename ...]
 
 =head1 DESCRIPTION
 
@@ -87,6 +87,5 @@ iter_cont:
 
 iter_done:
 
-     end
 .end
 

Modified: trunk/t/benchmarks.t
==============================================================================
--- trunk/t/benchmarks.t        (original)
+++ trunk/t/benchmarks.t        Tue Oct 11 15:39:36 2005
@@ -230,7 +230,7 @@ foreach ( sort keys %outputs ) {
 
         if ( ref $outputs{ $_ } eq q(Regexp) ) {
             if ( /\.pasm$/ ) {
-                output_like( $bench, $outputs{ $_ }, $_ );
+                pasm_output_like( $bench, $outputs{ $_ }, $_ );
             }
             elsif ( /\.imc$/ ) {
                 pir_output_like( $bench, $outputs{ $_ }, $_ );
@@ -241,7 +241,7 @@ foreach ( sort keys %outputs ) {
         }
         else {
             if ( /\.pasm$/ ) {
-                output_is( $bench, $outputs{ $_ }, $_ );
+                pasm_output_is( $bench, $outputs{ $_ }, $_ );
             }
             elsif ( /\.imc$/ ) {
                 pir_output_is( $bench, $outputs{ $_ }, $_ );

Modified: trunk/t/examples/pir.t
==============================================================================
--- trunk/t/examples/pir.t      (original)
+++ trunk/t/examples/pir.t      Tue Oct 11 15:39:36 2005
@@ -27,8 +27,11 @@ F<t/examples/pasm.t>
 =cut
 
 use strict;
-use Parrot::Test tests => 2;
+use Parrot::Test tests => 3;
 use Test::More;
+use Parrot::Config;
+
+my $PARROT = ".$PConfig{slash}$PConfig{test_prog}";
 
 # Set up expected output for examples
 my %expected = (
@@ -117,3 +120,11 @@ while ( my ( $example, $expected ) = eac
       ok( defined $extension, "no extension recognized for $code_fn" );
     }
 }
+
+
+# For testing md5sum.pir we need to pass a filename
+{
+  my $md5sum_fn = "examples$PConfig{slash}pir$PConfig{slash}md5sum.pir";
+  my $sum = `$PARROT $md5sum_fn $md5sum_fn`;
+  is( $sum, "3c97cb808c62b1b1a6ad9477d6edb850\t$md5sum_fn\n", $md5sum_fn );
+}

Modified: trunk/t/tools/pbc_merge.t
==============================================================================
--- trunk/t/tools/pbc_merge.t   (original)
+++ trunk/t/tools/pbc_merge.t   Tue Oct 11 15:39:36 2005
@@ -19,12 +19,14 @@ would be expected.

 

 =cut

 

+use strict;

+

 use Parrot::Test;

 use Test::More;

 use Parrot::Config;

 

-$PARROT = ".$PConfig{slash}$PConfig{test_prog}";

-$PBCMERGE = ".$PConfig{slash}pbc_merge$PConfig{exe}";

+my $PARROT = ".$PConfig{slash}$PConfig{test_prog}";

+my $PBCMERGE = ".$PConfig{slash}pbc_merge$PConfig{exe}";

 

 # Only test if we have the PBC merge tool built.

 if (-e $PBCMERGE) {

Reply via email to