aboutsummaryrefslogtreecommitdiff
path: root/compiler/lexer_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/lexer_test.go')
-rw-r--r--compiler/lexer_test.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/lexer_test.go b/compiler/lexer_test.go
index b172ae9..75770b0 100644
--- a/compiler/lexer_test.go
+++ b/compiler/lexer_test.go
@@ -31,8 +31,9 @@ func TestLexer(t *testing.T) {
},
{
caption: "lexer can recognize the special characters",
- src: "*|()",
+ src: ".*|()",
tokens: []*token{
+ newToken(tokenKindAnyChar, nullChar),
newToken(tokenKindRepeat, nullChar),
newToken(tokenKindAlt, nullChar),
newToken(tokenKindGroupOpen, nullChar),
@@ -42,9 +43,10 @@ func TestLexer(t *testing.T) {
},
{
caption: "lexer can recognize the escape sequences",
- src: "\\\\\\*\\|\\(\\)",
+ src: "\\\\\\.\\*\\|\\(\\)",
tokens: []*token{
newToken(tokenKindChar, '\\'),
+ newToken(tokenKindChar, '.'),
newToken(tokenKindChar, '*'),
newToken(tokenKindChar, '|'),
newToken(tokenKindChar, '('),