develooper Front page | perl.perl5.porters | Postings from September 2003

[PATCH t/op/sub_lval.t] TODO test for bug # 23790.

Thread Next
From:
Abigail
Date:
September 29, 2003 16:42
Subject:
[PATCH t/op/sub_lval.t] TODO test for bug # 23790.
Message ID:
20030929234137.GA16297@abigail.nl

I would have rather used

    ok ($line eq "onetwothree", " # TODO bug #23790")

or

    is ($line, "onetwothree", " # TODO bug #23790")

instead of a print statement with the hard coded test number in it,
but if I use any of the line above, the TODO test is counted as a 
failure. 


Abigail
  
--- t/op/sub_lval.t.orig	Tue Sep 30 00:11:37 2003
+++ t/op/sub_lval.t	Tue Sep 30 01:19:45 2003
@@ -1,4 +1,4 @@
-print "1..67\n";
+print "1..68\n";
 
 BEGIN {
     chdir 't' if -d 't';
@@ -560,3 +560,14 @@
     is($blah, 8, "yada");
 }
 
+{   my @arr  = qw /one two three/;
+    my $line = "";
+    sub lval_array () : lvalue {@arr}
+
+    for (lval_array) {
+        $line .= $_;
+    }
+
+    print ($line eq "onetwothree" ?     "ok 68 # TODO bug #23790\n"
+                                  : "not ok 68 # TODO bug #23790\n");
+}

Thread Next


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