Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fmt_test: resolve absolute path issue of fmt testing #2562

Merged
merged 1 commit into from
Jun 22, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 6 additions & 11 deletions tools/fmt_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,12 @@ def test_fmt(self):
# fetch it instead through tools/http_server.py.
deno_dir = d

# TODO(kt3k) Below can be run([deno_exe, "fmt", dst], ...)
# once the following issue is addressed:
# https://github.com/denoland/deno_std/issues/330
result = run_output([
os.path.join(root_path, self.deno_exe), "fmt",
"badly_formatted.js"
],
cwd=d,
merge_env={"DENO_DIR": deno_dir},
exit_on_fail=True,
quiet=True)
result = run_output(
[os.path.join(root_path, self.deno_exe), "fmt", dst],
cwd=d,
merge_env={"DENO_DIR": deno_dir},
exit_on_fail=True,
quiet=True)
self.assertEqual(result.code, 0)
with open(fixed_filename) as f:
expected = f.read()
Expand Down