mirror of
https://github.com/denoland/deno.git
synced 2025-02-01 20:25:12 -05:00
fmt_test: resolve old absolute path issue (#2562)
This commit is contained in:
parent
642eaf97c6
commit
201ddd29a7
1 changed files with 6 additions and 11 deletions
|
@ -23,17 +23,12 @@ class TestFmt(DenoTestCase):
|
||||||
# fetch it instead through tools/http_server.py.
|
# fetch it instead through tools/http_server.py.
|
||||||
deno_dir = d
|
deno_dir = d
|
||||||
|
|
||||||
# TODO(kt3k) Below can be run([deno_exe, "fmt", dst], ...)
|
result = run_output(
|
||||||
# once the following issue is addressed:
|
[os.path.join(root_path, self.deno_exe), "fmt", dst],
|
||||||
# https://github.com/denoland/deno_std/issues/330
|
cwd=d,
|
||||||
result = run_output([
|
merge_env={"DENO_DIR": deno_dir},
|
||||||
os.path.join(root_path, self.deno_exe), "fmt",
|
exit_on_fail=True,
|
||||||
"badly_formatted.js"
|
quiet=True)
|
||||||
],
|
|
||||||
cwd=d,
|
|
||||||
merge_env={"DENO_DIR": deno_dir},
|
|
||||||
exit_on_fail=True,
|
|
||||||
quiet=True)
|
|
||||||
self.assertEqual(result.code, 0)
|
self.assertEqual(result.code, 0)
|
||||||
with open(fixed_filename) as f:
|
with open(fixed_filename) as f:
|
||||||
expected = f.read()
|
expected = f.read()
|
||||||
|
|
Loading…
Add table
Reference in a new issue