@@ -2,11 +2,12 @@ package lexer_test
2
2
3
3
import (
4
4
"fmt"
5
- "github.com/stretchr/testify/assert"
6
- "github.com/stretchr/testify/require"
7
5
"strings"
8
6
"testing"
9
7
8
+ "github.com/stretchr/testify/assert"
9
+ "github.com/stretchr/testify/require"
10
+
10
11
"github.com/antonmedv/expr/file"
11
12
. "github.com/antonmedv/expr/parser/lexer"
12
13
)
@@ -63,7 +64,7 @@ var lexTests = []lexTest{
63
64
},
64
65
},
65
66
{
66
- `not in not abc not i not(false) not in` ,
67
+ `not in not abc not i not(false) not in not in ` ,
67
68
[]Token {
68
69
{Kind : Operator , Value : "not in" },
69
70
{Kind : Operator , Value : "not" },
@@ -74,8 +75,8 @@ var lexTests = []lexTest{
74
75
{Kind : Bracket , Value : "(" },
75
76
{Kind : Identifier , Value : "false" },
76
77
{Kind : Bracket , Value : ")" },
77
- {Kind : Operator , Value : "not" },
78
- {Kind : Operator , Value : "in" },
78
+ {Kind : Operator , Value : "not in " },
79
+ {Kind : Operator , Value : "not in" },
79
80
{Kind : EOF },
80
81
},
81
82
},
@@ -162,7 +163,6 @@ func TestLex_error(t *testing.T) {
162
163
tests := strings .Split (strings .Trim (errorTests , "\n " ), "\n \n " )
163
164
164
165
for _ , test := range tests {
165
-
166
166
input := strings .SplitN (test , "\n " , 2 )
167
167
if len (input ) != 2 {
168
168
t .Errorf ("syntax error in test: %q" , test )
0 commit comments