Author: coke
Date: Fri Nov  4 10:06:14 2005
New Revision: 9783

Modified:
   trunk/languages/tcl/t/cmd_regexp.t
Log:
Add some helper subs to faciliate simple RE checking in partcl's test suite.



Modified: trunk/languages/tcl/t/cmd_regexp.t
==============================================================================
--- trunk/languages/tcl/t/cmd_regexp.t  (original)
+++ trunk/languages/tcl/t/cmd_regexp.t  Fri Nov  4 10:06:14 2005
@@ -2,11 +2,37 @@
 
 use strict;
 use lib qw(tcl/t t . ../lib ../../lib ../../../lib);
-use Parrot::Test tests => 1;
+use Parrot::Test tests => 3;
 use Test::More;
 
+
 language_output_is("tcl",<<TCL,<<'OUT',"regexp no args");
 regexp
 TCL
 wrong # args: should be "regexp ?switches? exp string ?matchVar? ?subMatchVar 
subMatchVar ...?"
 OUT
+
+
+TODO: {
+  local $TODO="not implemented yet.";
+  regexp_is  ("asdf","asdf","literal, t");
+  regexp_isnt("asdf","fdsa","literal, f");
+}
+
+
+sub regexp_is   { regexp_check(@_,1); }
+sub regexp_isnt { regexp_check(@_,0); }
+
+sub regexp_check {
+  my ($pattern,$string,$reason,$flag) = @_;
+
+  language_output_is("tcl",<<"TCL",<<"OUT", $reason);
+
+puts [regexp {$pattern} {$string}]
+
+TCL
+$flag
+OUT
+
+}
+

Reply via email to