move TestPatternParse into stra package && remove incorrect test file
This commit is contained in:
parent
6d42824c2d
commit
7942662d79
|
@ -1,35 +0,0 @@
|
|||
package strategy
|
||||
|
||||
import (
|
||||
"common/scheme"
|
||||
"fmt"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestGetMyStrategy(t *testing.T) {
|
||||
fmt.Println("Now Test GetLocalStrategy:")
|
||||
data, err := getMyStrategy()
|
||||
if err == nil {
|
||||
fmt.Println("Result:")
|
||||
for _, x := range data {
|
||||
fmt.Printf(" %v\n", x)
|
||||
}
|
||||
} else {
|
||||
fmt.Println("Something Error:")
|
||||
fmt.Println(err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestPatternParse(t *testing.T) {
|
||||
fmt.Println("Now Test PatternParse:")
|
||||
var a scheme.Strategy
|
||||
a.Pattern = "test"
|
||||
parsePattern([]*scheme.Strategy{&a})
|
||||
fmt.Printf("a.pat:[%s], a.ex[%s]\n", a.Pattern, a.Exclude)
|
||||
a.Pattern = "```EXCLUDE```test"
|
||||
parsePattern([]*scheme.Strategy{&a})
|
||||
fmt.Printf("a.pat:[%s], a.ex[%s]\n", a.Pattern, a.Exclude)
|
||||
a.Pattern = "test```EXCLUDE```"
|
||||
parsePattern([]*scheme.Strategy{&a})
|
||||
fmt.Printf("a.pat:[%s], a.ex[%s]\n", a.Pattern, a.Exclude)
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package stra
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestPatternParse(t *testing.T) {
|
||||
fmt.Println("Now Test PatternParse:")
|
||||
var a Strategy
|
||||
a.Pattern = "test"
|
||||
parsePattern([]*Strategy{&a})
|
||||
fmt.Printf("a.pat:[%s], a.ex[%s]\n", a.Pattern, a.Exclude)
|
||||
a.Pattern = "```EXCLUDE```test"
|
||||
parsePattern([]*Strategy{&a})
|
||||
fmt.Printf("a.pat:[%s], a.ex[%s]\n", a.Pattern, a.Exclude)
|
||||
a.Pattern = "test```EXCLUDE```"
|
||||
parsePattern([]*Strategy{&a})
|
||||
fmt.Printf("a.pat:[%s], a.ex[%s]\n", a.Pattern, a.Exclude)
|
||||
}
|
Loading…
Reference in New Issue