From 151ce0266eb4de2c8fc600c81c192a5f791b6169 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Wed, 9 Oct 2019 17:10:09 -0400 Subject: Move everything into std subdir --- std/installer/testdata/args.ts | 9 +++++++++ std/installer/testdata/echo.ts | 6 ++++++ 2 files changed, 15 insertions(+) create mode 100644 std/installer/testdata/args.ts create mode 100644 std/installer/testdata/echo.ts (limited to 'std/installer/testdata') diff --git a/std/installer/testdata/args.ts b/std/installer/testdata/args.ts new file mode 100644 index 000000000..484cab5ab --- /dev/null +++ b/std/installer/testdata/args.ts @@ -0,0 +1,9 @@ +function args(args: string[]) { + const map = {}; + for (let i = 0; i < args.length; i++) { + map[i] = args[i]; + } + Deno.stdout.write(new TextEncoder().encode(JSON.stringify(map))); +} + +args(Deno.args.slice(1)); diff --git a/std/installer/testdata/echo.ts b/std/installer/testdata/echo.ts new file mode 100644 index 000000000..62ddd6d05 --- /dev/null +++ b/std/installer/testdata/echo.ts @@ -0,0 +1,6 @@ +function echo(args: string[]) { + const msg = args.join(", "); + Deno.stdout.write(new TextEncoder().encode(msg)); +} + +echo(Deno.args.slice(1)); -- cgit v1.2.3