From b7d8a0c6f6e90a65243264faa3f702d1a9471090 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Thu, 25 Apr 2019 19:47:33 +0200 Subject: Rename deno prefetch to deno fetch (#2210) --- tools/fetch_test.py | 30 ++++++++++++++++++++++++++++++ tools/prefetch_test.py | 30 ------------------------------ tools/test.py | 4 ++-- 3 files changed, 32 insertions(+), 32 deletions(-) create mode 100755 tools/fetch_test.py delete mode 100755 tools/prefetch_test.py (limited to 'tools') diff --git a/tools/fetch_test.py b/tools/fetch_test.py new file mode 100755 index 000000000..9ecb6fff4 --- /dev/null +++ b/tools/fetch_test.py @@ -0,0 +1,30 @@ +#!/usr/bin/env python +# Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. +import os +import sys +from util import mkdtemp, tests_path, run_output, green_ok +import shutil + + +def fetch_test(deno_exe): + sys.stdout.write("fetch_test...") + sys.stdout.flush() + + deno_dir = mkdtemp() + try: + t = os.path.join(tests_path, "006_url_imports.ts") + output = run_output([deno_exe, "fetch", t], + merge_env={"DENO_DIR": deno_dir}) + assert output == "" + # Check that we actually did the prefetch. + os.path.exists( + os.path.join(deno_dir, + "deps/http/localhost_PORT4545/tests/subdir/mod2.ts")) + finally: + shutil.rmtree(deno_dir) + + print green_ok() + + +if __name__ == "__main__": + fetch_test(sys.argv[1]) diff --git a/tools/prefetch_test.py b/tools/prefetch_test.py deleted file mode 100755 index 9c671dc00..000000000 --- a/tools/prefetch_test.py +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env python -# Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. -import os -import sys -from util import mkdtemp, tests_path, run_output, green_ok -import shutil - - -def prefetch_test(deno_exe): - sys.stdout.write("prefetch_test...") - sys.stdout.flush() - - deno_dir = mkdtemp() - try: - t = os.path.join(tests_path, "006_url_imports.ts") - output = run_output([deno_exe, "prefetch", t], - merge_env={"DENO_DIR": deno_dir}) - assert output == "" - # Check that we actually did the prefetch. - os.path.exists( - os.path.join(deno_dir, - "deps/http/localhost_PORT4545/tests/subdir/mod2.ts")) - finally: - shutil.rmtree(deno_dir) - - print green_ok() - - -if __name__ == "__main__": - prefetch_test(sys.argv[1]) diff --git a/tools/test.py b/tools/test.py index 770c9ca8c..7fddfc2ff 100755 --- a/tools/test.py +++ b/tools/test.py @@ -13,7 +13,7 @@ from unit_tests import unit_tests from util_test import util_test from benchmark_test import benchmark_test from repl_test import repl_tests -from prefetch_test import prefetch_test +from fetch_test import fetch_test from fmt_test import fmt_test import subprocess import http_server @@ -94,7 +94,7 @@ def main(argv): unit_tests(deno_exe) - prefetch_test(deno_exe) + fetch_test(deno_exe) fmt_test(deno_exe) integration_tests(deno_exe) -- cgit v1.2.3