made asc sorting optional and added regression tests

This commit is contained in:
ston1th 2017-11-13 19:29:43 +01:00
commit dc8463a290
4 changed files with 36 additions and 17 deletions

20
regression_test.go Normal file
View 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)
}
}
}