Ticket #1384 (closed bug: fixed)

Opened 12 years ago

Last modified 12 years ago

t/examples/pir.t: test #2 (quine_ord) failing

Reported by: jkeenan Owned by:
Priority: normal Milestone:
Component: testing Version: 1.9.0
Severity: medium Keywords:
Cc: tene Language:
Patch status: Platform:

Description (last modified by jkeenan) (diff)

Test # 2 in t/examples/pir.t is failing for me in trunk. Here is the test:

186 # expected output of a quine is the quine itself187 $expected{'quine_ord.pir'} = 
    Parrot::Test::slurp_file("examples/pir/quine_ord.pir");
188 
189 my %skips;
190 
191 while ( my ( $example, $expected ) = each %expected ) {
192     my $skip = $skips{$example};
193     if ($skip) {
194         my ( $cond, $reason ) = @{$skip};
195         if ( eval "$cond" ) {
196             Test::More->builder->skip("$example $reason");
197             next;
198         }
199     }
200     example_output_is( "examples/pir/$example", $expected );
201 }

The test file itself hasn't changed in months, so any problem is either in the example file or in PIR itself.

The example file, like many others underwent surgery this week related to Getopt::Obj.

svn diff -r 43059 examples/pir/quine_ord.pir
Index: examples/pir/quine_ord.pir
===================================================================
--- examples/pir/quine_ord.pir  (revision 43059)
+++ examples/pir/quine_ord.pir  (working copy)
@@ -3512,7 +3512,7 @@
 
     # Specification of command line arguments.
     .local pmc getopts
-    getopts = new "Getopt::Obj"
+    getopts = new ["Getopt";"Obj"]
     push getopts, "print-code-as-data"
 
     # Looking at command line

The output of the test is massive. Since the failure is of the got versus expected type, I compared those sections in the output of prove -v.

23c23
< #     getopts = new "Getopt::Obj"
---
> #     getopts = new ["Getopt";"Obj"]

So we 'got' "Getopt::Obj" when we were expecting ["Getopt";"Obj"].

tene, can you take a look? Thanks.

kid51

Change History

Changed 12 years ago by jkeenan

  • status changed from new to closed
  • resolution set to fixed
  • description modified (diff)

Fixed by mikehh++ in r43170.

Note: See TracTickets for help on using tickets.