module support
This commit is contained in:
@@ -1227,3 +1227,23 @@ func testComment(t *testing.T, s ast.Statement, expected string) bool {
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
func TestParsingImportExpressions(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
|
||||
tests := []struct {
|
||||
input string
|
||||
expected string
|
||||
}{
|
||||
{`import("mod")`, `import("mod")`},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
l := lexer.New(tt.input)
|
||||
p := New(l)
|
||||
program := p.ParseProgram()
|
||||
checkParserErrors(t, p)
|
||||
|
||||
assert.Equal(tt.expected, program.String())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user