mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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:
parent
d08f0067b5
commit
68e250516c
5 changed files with 1174 additions and 21 deletions
|
|
@ -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++ {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue