summaryrefslogtreecommitdiff
path: root/cli/test_runner.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-02-26 22:11:52 +0100
committerGitHub <noreply@github.com>2020-02-26 22:11:52 +0100
commitdaf7617f42e2e7520344ec98db3d60016b85fd73 (patch)
tree7469656b3640dd9130855316779b823dbe9bfa4b /cli/test_runner.rs
parentfb1075da6e33a65daaa3e9c2ecf1d7a9a5021f58 (diff)
rewrite normalize_path (#4143)
Rewrite "normalize_path()" to remove all intermediate components from the path, ie. "./" and "../". It's very similar in functionality to fs::canonicalize(), however "normalize_path() doesn't resolve symlinks.
Diffstat (limited to 'cli/test_runner.rs')
-rw-r--r--cli/test_runner.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/test_runner.rs b/cli/test_runner.rs
index b2eea3480..eb1d42efd 100644
--- a/cli/test_runner.rs
+++ b/cli/test_runner.rs
@@ -1,5 +1,6 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
+use crate::fs as deno_fs;
use crate::installer::is_remote_url;
use deno_core::ErrBox;
use std;
@@ -32,8 +33,7 @@ pub fn prepare_test_modules_urls(
let mut prepared = vec![];
for path in include_paths {
- let q = root_path.join(path);
- let p = q.canonicalize()?;
+ let p = deno_fs::normalize_path(&root_path.join(path));
if p.is_dir() {
let test_files = crate::fs::files_in_subtree(p, is_supported);
let test_files_as_urls = test_files