summaryrefslogtreecommitdiff
path: root/tests/testdata/cat.ts
diff options
context:
space:
mode:
Diffstat (limited to 'tests/testdata/cat.ts')
-rw-r--r--tests/testdata/cat.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/testdata/cat.ts b/tests/testdata/cat.ts
new file mode 100644
index 000000000..f0205451e
--- /dev/null
+++ b/tests/testdata/cat.ts
@@ -0,0 +1,10 @@
+import { copy } from "../../test_util/std/streams/copy.ts";
+async function main() {
+ for (let i = 1; i < Deno.args.length; i++) {
+ const filename = Deno.args[i];
+ const file = await Deno.open(filename);
+ await copy(file, Deno.stdout);
+ }
+}
+
+main();