summaryrefslogtreecommitdiff
path: root/cli/tests/integration/repl_tests.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/integration/repl_tests.rs')
-rw-r--r--cli/tests/integration/repl_tests.rs30
1 files changed, 13 insertions, 17 deletions
diff --git a/cli/tests/integration/repl_tests.rs b/cli/tests/integration/repl_tests.rs
index 77a534d2e..c25a151a1 100644
--- a/cli/tests/integration/repl_tests.rs
+++ b/cli/tests/integration/repl_tests.rs
@@ -316,7 +316,15 @@ fn repl_cwd() {
.args_vec(["repl", "-A"])
.with_pty(|mut console| {
console.write_line("Deno.cwd()");
- console.expect(temp_dir.path().file_name().unwrap().to_str().unwrap());
+ console.expect(
+ temp_dir
+ .path()
+ .as_path()
+ .file_name()
+ .unwrap()
+ .to_str()
+ .unwrap(),
+ );
});
}
@@ -535,10 +543,7 @@ fn missing_deno_dir() {
"repl",
Some(vec!["1"]),
Some(vec![
- (
- "DENO_DIR".to_owned(),
- deno_dir_path.to_str().unwrap().to_owned(),
- ),
+ ("DENO_DIR".to_owned(), deno_dir_path.to_string()),
("NO_COLOR".to_owned(), "1".to_owned()),
]),
false,
@@ -558,10 +563,7 @@ fn custom_history_path() {
"repl",
Some(vec!["1"]),
Some(vec![
- (
- "DENO_REPL_HISTORY".to_owned(),
- history_path.to_str().unwrap().to_owned(),
- ),
+ ("DENO_REPL_HISTORY".to_owned(), history_path.to_string()),
("NO_COLOR".to_owned(), "1".to_owned()),
]),
false,
@@ -580,10 +582,7 @@ fn disable_history_file() {
"repl",
Some(vec!["1"]),
Some(vec![
- (
- "DENO_DIR".to_owned(),
- deno_dir.path().to_str().unwrap().to_owned(),
- ),
+ ("DENO_DIR".to_owned(), deno_dir.path().to_string()),
("DENO_REPL_HISTORY".to_owned(), "".to_owned()),
("NO_COLOR".to_owned(), "1".to_owned()),
]),
@@ -877,10 +876,7 @@ fn npm_packages() {
let mut env_vars = util::env_vars_for_npm_tests();
env_vars.push(("NO_COLOR".to_owned(), "1".to_owned()));
let temp_dir = TempDir::new();
- env_vars.push((
- "DENO_DIR".to_string(),
- temp_dir.path().to_string_lossy().to_string(),
- ));
+ env_vars.push(("DENO_DIR".to_string(), temp_dir.path().to_string()));
{
let (out, err) = util::run_and_collect_output_with_args(