From ee9cfb5a60cbe68c7daa5e7edd292486e697bfa4 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Fri, 18 May 2018 11:59:05 -0400 Subject: [PATCH] Add testdata/005_more_imports.ts --- testdata/005_more_imports.ts | 11 +++++++++++ testdata/005_more_imports.ts.out | 1 + testdata/subdir/mod1.ts | 13 +++++++++++++ testdata/subdir/subdir2/mod2.ts | 9 +++++++++ 4 files changed, 34 insertions(+) create mode 100644 testdata/005_more_imports.ts create mode 100644 testdata/005_more_imports.ts.out create mode 100644 testdata/subdir/mod1.ts create mode 100644 testdata/subdir/subdir2/mod2.ts diff --git a/testdata/005_more_imports.ts b/testdata/005_more_imports.ts new file mode 100644 index 0000000000..52dd1df7b9 --- /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 0000000000..e965047ad7 --- /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 0000000000..c09755a3b0 --- /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 0000000000..c88d4708c8 --- /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(); +}