Skip to content

Commit

Permalink
syntax: add some scanner test cases (google#237)
Browse files Browse the repository at this point in the history
  • Loading branch information
adonovan authored Aug 20, 2019
1 parent 688506e commit 988906f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions syntax/scan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,10 @@ pass`, "pass newline pass EOF"}, // consecutive newlines are consolidated
{`while cond: pass`, "while cond : pass EOF"},
// github.com/google/starlark-go/issues/107
{"~= ~= 5", "~ = ~ = 5 EOF"},
{"0in", "0 in EOF"},
{"0or", "foo.star:1:3: invalid octal literal"},
{"6in", "6 in EOF"},
{"6or", "6 or EOF"},
} {
got, err := scan(test.input)
if err != nil {
Expand Down

0 comments on commit 988906f

Please sign in to comment.