Add syntax tests for import statements

This commit is contained in:
Alex Beregszaszi 2018-07-24 20:22:46 +01:00
parent 49573bad46
commit 7b5e912874
5 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,3 @@
import {hello, world} from "hello";
// ----
// ParserError: (0-35): Source "hello" not found: File not supplied initially.

View File

@ -0,0 +1,3 @@
import {hello, world} from function;
// ----
// ParserError: (27-35): Expected import path.

View File

@ -0,0 +1,3 @@
import {hello, world};
// ----
// ParserError: (21-22): Expected "from".

View File

@ -0,0 +1,3 @@
import function;
// ----
// ParserError: (7-15): Expected string literal (path), "*" or alias list.

View File

@ -0,0 +1,3 @@
import "hello";
// ----
// ParserError: (0-15): Source "hello" not found: File not supplied initially.