make a simpler regexp implementation with fewer dependencies and put it inside testing.

remove "regexp." from regexp tests.

R=rsc
DELTA=1173  (1152 added, 1 deleted, 20 changed)
OCL=33028
CL=33037
This commit is contained in:
Rob Pike 2009-08-11 13:54:47 -07:00
parent d08f0067b5
commit 68e250516c
5 changed files with 1174 additions and 21 deletions

View file

@ -15,8 +15,8 @@ import (
"flag";
"fmt";
"os";
"regexp";
"runtime";
"testing";
)
// Report as tests are run; default is silent for success.
@ -122,9 +122,9 @@ func Main(tests []Test) {
if len(tests) == 0 {
println("testing: warning: no tests to run");
}
re, err := regexp.Compile(*match);
if err != nil {
println("invalid regexp for -match:", err.String());
re, err := CompileRegexp(*match);
if err != "" {
println("invalid regexp for -match:", err);
os.Exit(1);
}
for i := 0; i < len(tests); i++ {