made asc sorting optional and added regression tests
This commit is contained in:
parent
a1a335a53c
commit
dc8463a290
4 changed files with 36 additions and 17 deletions
20
regression_test.go
Normal file
20
regression_test.go
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
package filter
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestRegression(t *testing.T) {
|
||||
data := []string{
|
||||
"sort::asc",
|
||||
"Int.:",
|
||||
"String.:",
|
||||
"sort::desc",
|
||||
".:",
|
||||
"sort:.0:asc",
|
||||
}
|
||||
for _, v := range data {
|
||||
_, err := NewQuery(v)
|
||||
if err == nil {
|
||||
t.Errorf("regression: '%s'", v)
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue