summaryrefslogtreecommitdiff
path: root/tests/subdir
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2018-08-01 16:30:19 -0400
committerRyan Dahl <ry@tinyclouds.org>2018-08-02 12:49:40 -0400
commit7fe656f4b9ab594035f7c0b6c0c68ca41871daca (patch)
tree3e9fc93de1babc3c60b06dac6ae9ce2a00a58638 /tests/subdir
parent421358e7a9612527fdd9ed9a9a59635c12cdaab5 (diff)
Add 005_more_imports.ts
And run check_output_test in order.
Diffstat (limited to 'tests/subdir')
-rw-r--r--tests/subdir/mod1.ts17
-rw-r--r--tests/subdir/subdir2/mod2.ts9
2 files changed, 26 insertions, 0 deletions
diff --git a/tests/subdir/mod1.ts b/tests/subdir/mod1.ts
new file mode 100644
index 000000000..393535588
--- /dev/null
+++ b/tests/subdir/mod1.ts
@@ -0,0 +1,17 @@
+import { returnsFoo, printHello2 } from "./subdir2/mod2.ts";
+
+export function returnsHi(): string {
+ return "Hi";
+}
+
+export function returnsFoo2(): string {
+ return returnsFoo();
+}
+
+export function printHello3(): void {
+ printHello2();
+}
+
+export function throwsError(): void {
+ throw Error("exception from mod1");
+}
diff --git a/tests/subdir/subdir2/mod2.ts b/tests/subdir/subdir2/mod2.ts
new file mode 100644
index 000000000..c88d4708c
--- /dev/null
+++ b/tests/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();
+}