diff options
Diffstat (limited to 'testdata')
28 files changed, 0 insertions, 161 deletions
diff --git a/testdata/001_hello.js b/testdata/001_hello.js deleted file mode 100644 index accefceba..000000000 --- a/testdata/001_hello.js +++ /dev/null @@ -1 +0,0 @@ -console.log("Hello World"); diff --git a/testdata/001_hello.js.out b/testdata/001_hello.js.out deleted file mode 100644 index 557db03de..000000000 --- a/testdata/001_hello.js.out +++ /dev/null @@ -1 +0,0 @@ -Hello World diff --git a/testdata/002_hello.ts b/testdata/002_hello.ts deleted file mode 100644 index accefceba..000000000 --- a/testdata/002_hello.ts +++ /dev/null @@ -1 +0,0 @@ -console.log("Hello World"); diff --git a/testdata/002_hello.ts.out b/testdata/002_hello.ts.out deleted file mode 100644 index 557db03de..000000000 --- a/testdata/002_hello.ts.out +++ /dev/null @@ -1 +0,0 @@ -Hello World diff --git a/testdata/003_relative_import.ts b/testdata/003_relative_import.ts deleted file mode 100644 index 01d5d7faa..000000000 --- a/testdata/003_relative_import.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { printHello } from "./subdir/print_hello.ts"; - -printHello(); diff --git a/testdata/003_relative_import.ts.out b/testdata/003_relative_import.ts.out deleted file mode 100644 index e965047ad..000000000 --- a/testdata/003_relative_import.ts.out +++ /dev/null @@ -1 +0,0 @@ -Hello diff --git a/testdata/004_set_timeout.ts b/testdata/004_set_timeout.ts deleted file mode 100644 index 214b25086..000000000 --- a/testdata/004_set_timeout.ts +++ /dev/null @@ -1,11 +0,0 @@ -setTimeout(() => { - console.log("World"); -}, 10); - -console.log("Hello"); - -const id = setTimeout(() => { - console.log("Not printed"); -}, 10000); - -clearTimeout(id); diff --git a/testdata/004_set_timeout.ts.out b/testdata/004_set_timeout.ts.out deleted file mode 100644 index f9264f7fb..000000000 --- a/testdata/004_set_timeout.ts.out +++ /dev/null @@ -1,2 +0,0 @@ -Hello -World diff --git a/testdata/005_more_imports.ts b/testdata/005_more_imports.ts deleted file mode 100644 index 52dd1df7b..000000000 --- a/testdata/005_more_imports.ts +++ /dev/null @@ -1,11 +0,0 @@ -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 deleted file mode 100644 index e965047ad..000000000 --- a/testdata/005_more_imports.ts.out +++ /dev/null @@ -1 +0,0 @@ -Hello diff --git a/testdata/006_url_imports.ts b/testdata/006_url_imports.ts deleted file mode 100644 index 57af683cf..000000000 --- a/testdata/006_url_imports.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { printHello } from "http://localhost:4545/testdata/subdir/print_hello.ts"; -printHello(); -console.log("success"); diff --git a/testdata/006_url_imports.ts.out b/testdata/006_url_imports.ts.out deleted file mode 100644 index f745fe3cf..000000000 --- a/testdata/006_url_imports.ts.out +++ /dev/null @@ -1,3 +0,0 @@ -Downloading http://localhost:4545/testdata/subdir/print_hello.ts -Hello -success diff --git a/testdata/008_stack_trace.ts b/testdata/008_stack_trace.ts deleted file mode 100644 index 6aa0fcc3b..000000000 --- a/testdata/008_stack_trace.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { throwsError } from "./subdir/mod1.ts"; - -function foo() { - throwsError(); -} - -foo(); diff --git a/testdata/009_pub_sub.ts b/testdata/009_pub_sub.ts deleted file mode 100644 index 3d33c820d..000000000 --- a/testdata/009_pub_sub.ts +++ /dev/null @@ -1,18 +0,0 @@ -import * as deno from "deno"; - -deno.sub("echo", (ui8: Uint8Array) => { - const str = String.fromCharCode.apply(null, ui8); - console.log("Got message", str); -}); - -function str2ui8(str: string): Uint8Array { - const ui8 = new Uint8Array(str.length); - for (let i = 0; i < str.length; i++) { - ui8[i] = str.charCodeAt(i); - } - return ui8; -} - -console.log("Before deno.pub()"); -deno.pub("echo", str2ui8("hello")); -console.log("After deno.pub()"); diff --git a/testdata/009_pub_sub.ts.out b/testdata/009_pub_sub.ts.out deleted file mode 100644 index d5581cafb..000000000 --- a/testdata/009_pub_sub.ts.out +++ /dev/null @@ -1,3 +0,0 @@ -Before deno.pub() -After deno.pub() -Got message hello diff --git a/testdata/010_set_interval.ts b/testdata/010_set_interval.ts deleted file mode 100644 index e013d00bc..000000000 --- a/testdata/010_set_interval.ts +++ /dev/null @@ -1,7 +0,0 @@ -const id = setInterval(function() { - console.log("test") -}, 200); - -setTimeout(function() { - clearInterval(id) -}, 500) diff --git a/testdata/010_set_interval.ts.out b/testdata/010_set_interval.ts.out deleted file mode 100644 index dec2cbe1f..000000000 --- a/testdata/010_set_interval.ts.out +++ /dev/null @@ -1,2 +0,0 @@ -test -test diff --git a/testdata/012_async.ts b/testdata/012_async.ts deleted file mode 100644 index 57ae355c2..000000000 --- a/testdata/012_async.ts +++ /dev/null @@ -1,11 +0,0 @@ -// Check that we can use the async keyword. -async function main() { - await new Promise((resolve, reject) => { - console.log("2"); - setTimeout(resolve, 100); - }); - console.log("3"); -} - -console.log("1"); -main(); diff --git a/testdata/012_async.ts.out b/testdata/012_async.ts.out deleted file mode 100644 index 01e79c32a..000000000 --- a/testdata/012_async.ts.out +++ /dev/null @@ -1,3 +0,0 @@ -1 -2 -3 diff --git a/testdata/async_error.ts b/testdata/async_error.ts deleted file mode 100644 index 12dee11eb..000000000 --- a/testdata/async_error.ts +++ /dev/null @@ -1,9 +0,0 @@ - -console.log("hello"); -const foo = async () => { - console.log("before error"); - throw Error("error"); -} - -foo(); -console.log("world"); diff --git a/testdata/async_error.ts.out b/testdata/async_error.ts.out deleted file mode 100644 index 7b7dc9d19..000000000 --- a/testdata/async_error.ts.out +++ /dev/null @@ -1,10 +0,0 @@ -hello -before error -error Error: error - at foo ([WILDCARD]testdata/async_error.ts:4:11) - at eval ([WILDCARD]testdata/async_error.ts:6:1) - at Object.eval [as globalEval] (<anonymous>) - at execute (/main.js:[WILDCARD]) - at FileModule.compileAndRun (/main.js:[WILDCARD]) - at /main.js:[WILDCARD] - at /main.js:[WILDCARD] diff --git a/testdata/error.ts b/testdata/error.ts deleted file mode 100644 index 624bc55da..000000000 --- a/testdata/error.ts +++ /dev/null @@ -1,9 +0,0 @@ -function foo() { - throw Error("bad"); -} - -function bar() { - foo() -} - -bar() diff --git a/testdata/error.ts.out b/testdata/error.ts.out deleted file mode 100644 index 952758df9..000000000 --- a/testdata/error.ts.out +++ /dev/null @@ -1,10 +0,0 @@ -/main.js:[WILDCARD] - throw _iteratorError; - ^ -Error: bad - at foo ([WILDCARD]testdata/error.ts:2:9) - at bar ([WILDCARD]testdata/error.ts:6:3) - at eval ([WILDCARD]testdata/error.ts:9:1) - at Object.eval [as globalEval] (<anonymous>) - at execute (../runtime.ts:[WILDCARD]) - at FileModule.compileAndRun (../runtime.ts:[WILDCARD] diff --git a/testdata/import_typescript.ts b/testdata/import_typescript.ts deleted file mode 100644 index 0f161ceb0..000000000 --- a/testdata/import_typescript.ts +++ /dev/null @@ -1,3 +0,0 @@ -import * as ts from "typescript"; - -console.log("typescript version", ts.version); diff --git a/testdata/import_typescript.ts.out b/testdata/import_typescript.ts.out deleted file mode 100644 index 0a142219b..000000000 --- a/testdata/import_typescript.ts.out +++ /dev/null @@ -1 +0,0 @@ -typescript version 2.8.3 diff --git a/testdata/subdir/mod1.ts b/testdata/subdir/mod1.ts deleted file mode 100644 index 393535588..000000000 --- a/testdata/subdir/mod1.ts +++ /dev/null @@ -1,17 +0,0 @@ -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/testdata/subdir/print_hello.ts b/testdata/subdir/print_hello.ts deleted file mode 100644 index 7ecce5040..000000000 --- a/testdata/subdir/print_hello.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function printHello(): void { - console.log("Hello"); -} diff --git a/testdata/subdir/subdir2/mod2.ts b/testdata/subdir/subdir2/mod2.ts deleted file mode 100644 index c88d4708c..000000000 --- a/testdata/subdir/subdir2/mod2.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { printHello } from "../print_hello.ts"; - -export function returnsFoo(): string { - return "Foo"; -} - -export function printHello2(): void { - printHello(); -} |