From: Bram Date: Sun, 31 May 2009 12:47:49 +0000 (+0200) Subject: Document test structure X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b73790d3c9fb2026c569344bfe353223af9bdbea;p=p5sagit%2Fp5-mst-13.2.git Document test structure (was Re: [perl #56194] Regex: (((??{1 + $^N}))) behaves differently in 5.10.0 than in blead) Adds some basic documentation about the test structure. --- diff --git a/t/op/pat.t b/t/op/pat.t index 88fbe5d..62ca4b2 100755 --- a/t/op/pat.t +++ b/t/op/pat.t @@ -4143,6 +4143,8 @@ sub run_tests { my $c = 0; for my $test ( + # Test structure: + # [ Expected result, Regex, Expected value(s) of $^N, Expected value(s) of $+ ] [ 1, qr#^$nested_tags$#, "bla blubb bla", "a b a" ], [ 1, qr#^($nested_tags)$#, "bla blubb ", "a b a" ], [ 1, qr#^(|)$nested_tags$#, "bla blubb bla", "a b a" ], @@ -4199,6 +4201,14 @@ sub run_tests { my $re8 = qr/(\d+)/; my $c = 0; for my $test ( + # Test structure: + # [ + # String to match + # Regex too match + # Expected values of $^N + # Expected values of $+ + # Expected values of $1, $2, $3, $4 and $5 + # ] [ "1233", qr#^(1)((??{ push @ctl_n, $f->($^N); push @plus, $f->($+); $^N + 1}))+(??{$^N})$#,