Author: coke
Date: Sun Aug 7 08:27:13 2005
New Revision: 8855
Modified:
trunk/languages/tcl/tcl-test.pl
Log:
Convert a few more of the tcl test suite tests into perl-style.
Modified: trunk/languages/tcl/tcl-test.pl
==============================================================================
--- trunk/languages/tcl/tcl-test.pl (original)
+++ trunk/languages/tcl/tcl-test.pl Sun Aug 7 08:27:13 2005
@@ -115,14 +115,14 @@ sub choose {
sub extract_tests {
my ($source) = @_;
my %tests;
-
+
my $regex = qr[
- test \s+ (\S+)
- \s+ \{ ([^{]+) \}
- \s+ \{ \n
- ( (?:\s+ [^\n]+\n)+ )
+ test \s+ (\S+) # test ident
+ \s+ \{ ([^}]+) \} # test description
+ \s+ (?:\S+ \s+)? \{ \n # optional test harness info (ignoring)
+ ( (?:\s+ [^\n]+\n)+ ) # test body
\} \s+
- (?: \{ ([^\n]+) \}
+ (?: \{ ([^\n]+) \} # test result
| " ((?:[^"\\]|\\.)+) " #" (keep my editor happy)
| (\w+) )
]sx;