diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2023-06-10 11:09:45 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-10 11:09:45 -0400 |
commit | 7f15126f23d97f20a4fb33e43136cd4d13825863 (patch) | |
tree | 85d77389969b31999680059e65954a9fa863758e /cli/tests/integration/cert_tests.rs | |
parent | f3326eebd6af2aaca1543e8cb543a7b16762bc96 (diff) |
chore(tests): test_util - Add `PathRef` (#19450)
This adds a new `PathRef` struct to test_util for making it easier to
work with paths in test code. I'm going to expand on this more in the
future.
Diffstat (limited to 'cli/tests/integration/cert_tests.rs')
-rw-r--r-- | cli/tests/integration/cert_tests.rs | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/cli/tests/integration/cert_tests.rs b/cli/tests/integration/cert_tests.rs index b04f2d35e..ffd4b449d 100644 --- a/cli/tests/integration/cert_tests.rs +++ b/cli/tests/integration/cert_tests.rs @@ -82,7 +82,7 @@ fn cafile_env_fetch() { context .new_command() .args(format!("cache {module_url}")) - .env("DENO_CERT", cafile.to_string_lossy()) + .env("DENO_CERT", cafile) .run() .assert_exit_code(0) .skip_output_check(); @@ -96,11 +96,7 @@ fn cafile_fetch() { let cafile = context.testdata_path().join("tls/RootCA.pem"); context .new_command() - .args(format!( - "cache --quiet --cert {} {}", - cafile.to_string_lossy(), - module_url, - )) + .args(format!("cache --quiet --cert {} {}", cafile, module_url,)) .run() .assert_exit_code(0) .assert_matches_text(""); @@ -116,13 +112,13 @@ fn cafile_compile() { temp_dir.join("cert") }; let output = context.new_command() - .args(format!("compile --quiet --cert ./tls/RootCA.pem --allow-net --output {} ./cert/cafile_ts_fetch.ts", output_exe.to_string_lossy())) + .args(format!("compile --quiet --cert ./tls/RootCA.pem --allow-net --output {} ./cert/cafile_ts_fetch.ts", output_exe)) .run(); output.skip_output_check(); context .new_command() - .command_name(output_exe.to_string_lossy()) + .command_name(output_exe) .run() .assert_matches_text("[WILDCARD]\nHello\n"); } |