diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2018-05-18 11:59:05 -0400 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2018-05-18 12:20:59 -0400 |
commit | ee9cfb5a60cbe68c7daa5e7edd292486e697bfa4 (patch) | |
tree | 9e0f03b89f28a3972330206d80fcd056e5644977 | |
parent | 8f0e242f4bfb5df1039c2d18516b4de7e1af7745 (diff) |
Add testdata/005_more_imports.ts
-rw-r--r-- | testdata/005_more_imports.ts | 11 | ||||
-rw-r--r-- | testdata/005_more_imports.ts.out | 1 | ||||
-rw-r--r-- | testdata/subdir/mod1.ts | 13 | ||||
-rw-r--r-- | testdata/subdir/subdir2/mod2.ts | 9 |
4 files changed, 34 insertions, 0 deletions
diff --git a/testdata/005_more_imports.ts b/testdata/005_more_imports.ts new file mode 100644 index 000000000..52dd1df7b --- /dev/null +++ b/testdata/005_more_imports.ts @@ -0,0 +1,11 @@ +import { returnsHi, returnsFoo2, printHello3 } from "./subdir/mod1.ts"; + +printHello3(); + +if (returnsHi() !== "Hi") { + throw Error("Unexpected"); +} + +if (returnsFoo2() !== "Foo") { + throw Error("Unexpected"); +} diff --git a/testdata/005_more_imports.ts.out b/testdata/005_more_imports.ts.out new file mode 100644 index 000000000..e965047ad --- /dev/null +++ b/testdata/005_more_imports.ts.out @@ -0,0 +1 @@ +Hello diff --git a/testdata/subdir/mod1.ts b/testdata/subdir/mod1.ts new file mode 100644 index 000000000..c09755a3b --- /dev/null +++ b/testdata/subdir/mod1.ts @@ -0,0 +1,13 @@ +import { returnsFoo, printHello2 } from "./subdir2/mod2.ts"; + +export function returnsHi(): string { + return "Hi"; +} + +export function returnsFoo2(): string { + return returnsFoo(); +} + +export function printHello3(): void { + printHello2(); +} diff --git a/testdata/subdir/subdir2/mod2.ts b/testdata/subdir/subdir2/mod2.ts new file mode 100644 index 000000000..c88d4708c --- /dev/null +++ b/testdata/subdir/subdir2/mod2.ts @@ -0,0 +1,9 @@ +import { printHello } from "../print_hello.ts"; + +export function returnsFoo(): string { + return "Foo"; +} + +export function printHello2(): void { + printHello(); +} |