diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2019-03-28 16:05:41 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-28 16:05:41 -0400 |
commit | c25e262b04c15d4de7107cc131de467882e7dcec (patch) | |
tree | a5e2fd2ba73f9f8881d0ea9166c36958747b6f49 /tools/fmt_test.py | |
parent | 51abcd614731bdb47a79f9f0c0fed81ddb7a474a (diff) |
Merge the --recompile and --reload flags (#2003)
Diffstat (limited to 'tools/fmt_test.py')
-rwxr-xr-x | tools/fmt_test.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tools/fmt_test.py b/tools/fmt_test.py index d4aca75aa..dd704485d 100755 --- a/tools/fmt_test.py +++ b/tools/fmt_test.py @@ -4,6 +4,7 @@ import os import sys from util import mkdtemp, root_path, tests_path, run, green_ok import shutil +import json def fmt_test(deno_exe): @@ -18,13 +19,17 @@ def fmt_test(deno_exe): # Set DENO_DIR to //js/ so we don't have to rely on an intenet # connection to download https://deno.land/std/prettier/main.ts deno_dir = os.path.join(root_path, "js") - run([deno_exe, dst, "--fmt", "--allow-read"], - merge_env={"DENO_DIR": deno_dir}) + run([deno_exe, dst, "--fmt"], merge_env={"DENO_DIR": deno_dir}) with open(fixed_filename) as f: expected = f.read() with open(dst) as f: actual = f.read() - assert expected == actual + if expected != actual: + print "Expected didn't match actual." + print "expected: ", json.dumps(expected) + print "actual: ", json.dumps(actual) + sys.exit(1) + finally: shutil.rmtree(d) print green_ok() |