Add syntax tests for import statements

This commit is contained in:
Alex Beregszaszi
2018-07-25 11:01:41 +01:00
parent 49573bad46
commit 7b5e912874
5 changed files with 15 additions and 0 deletions
@@ -0,0 +1,3 @@
import {hello, world} from "hello";
// ----
// ParserError: (0-35): Source "hello" not found: File not supplied initially.
@@ -0,0 +1,3 @@
import {hello, world} from function;
// ----
// ParserError: (27-35): Expected import path.
@@ -0,0 +1,3 @@
import {hello, world};
// ----
// ParserError: (21-22): Expected "from".
@@ -0,0 +1,3 @@
import function;
// ----
// ParserError: (7-15): Expected string literal (path), "*" or alias list.
@@ -0,0 +1,3 @@
import "hello";
// ----
// ParserError: (0-15): Source "hello" not found: File not supplied initially.