Author: jkeenan
Date: Sat May 19 16:01:43 2007
New Revision: 18591

Modified:
   trunk/t/tools/ops2pmutils/08-sort_ops.t

Log:
Fixing bug described in http://rt.perl.org/rt3/Ticket/Display.html?id=42975:
To fully test warnings in Parrot::Ops2pm::Utils::sort_ops(), have test create
a dummy ops file with an ops found in neither ops.num nor ops.skip.  Warning
is now generated, so we can dispense with the TODO block.  bernhard++.


Modified: trunk/t/tools/ops2pmutils/08-sort_ops.t
==============================================================================
--- trunk/t/tools/ops2pmutils/08-sort_ops.t     (original)
+++ trunk/t/tools/ops2pmutils/08-sort_ops.t     Sat May 19 16:01:43 2007
@@ -206,6 +206,21 @@
         ok( copy( qq{$cwd/$num},       qq{$tdir/$num} ),       "copied ops.num 
file" );
         ok( copy( qq{$cwd/$skip},      qq{$tdir/$skip} ),      "copied 
ops.skip file" );
         ok( copy( qq{$cwd/DEVELOPING}, qq{$tdir/DEVELOPING} ), "copied 
DEVELOPING file" );
+        my $dummyops = "./src/ops/dummy.ops";
+        open my $FH, ">", $dummyops or
+            croak "Unable to open handle to create dummy ops file: $!";
+        print $FH <<DUMMYOPS;
+/*
+** dummy.ops
+*/
+
+VERSION = PARROT_VERSION;
+
+inline op zzzzzz(inout INT, in INT) :base_core {
+  goto NEXT();
+}
+DUMMYOPS
+        close $FH or croak "Unable to close handle after writing: $!";
         my @opsfiles = glob("./src/ops/*.ops");
 
         my $self = Parrot::Ops2pm::Utils->new(
@@ -232,15 +247,12 @@
         ok( $self->sort_ops(), "sort_ops returned successfully" );
         $msg = $tie->READLINE;
         untie *STDERR;
-    TODO: {
-        local $TODO = "All ops currently being passed as arguments are found 
either in ops.num or in ops.skip";
         
         like(
             $msg,
             qr|not in ops\.num nor ops\.skip|,
             "Got expected warning about ops in neither ops.num or ops.skip"
         );
-    };
 
         # To do:  Test that the sorting was correct.
 

Reply via email to