summaryrefslogtreecommitdiff
path: root/std/path/resolve_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'std/path/resolve_test.ts')
-rw-r--r--std/path/resolve_test.ts49
1 files changed, 0 insertions, 49 deletions
diff --git a/std/path/resolve_test.ts b/std/path/resolve_test.ts
deleted file mode 100644
index dec032f47..000000000
--- a/std/path/resolve_test.ts
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright the Browserify authors. MIT License.
-// Ported from https://github.com/browserify/path-browserify/
-import { assertEquals } from "../testing/asserts.ts";
-import * as path from "./mod.ts";
-
-const windowsTests =
- // arguments result
- [
- [["c:/blah\\blah", "d:/games", "c:../a"], "c:\\blah\\a"],
- [["c:/ignore", "d:\\a/b\\c/d", "\\e.exe"], "d:\\e.exe"],
- [["c:/ignore", "c:/some/file"], "c:\\some\\file"],
- [["d:/ignore", "d:some/dir//"], "d:\\ignore\\some\\dir"],
- [["//server/share", "..", "relative\\"], "\\\\server\\share\\relative"],
- [["c:/", "//"], "c:\\"],
- [["c:/", "//dir"], "c:\\dir"],
- [["c:/", "//server/share"], "\\\\server\\share\\"],
- [["c:/", "//server//share"], "\\\\server\\share\\"],
- [["c:/", "///some//dir"], "c:\\some\\dir"],
- [
- ["C:\\foo\\tmp.3\\", "..\\tmp.3\\cycles\\root.js"],
- "C:\\foo\\tmp.3\\cycles\\root.js",
- ],
- ];
-const posixTests =
- // arguments result
- [
- [["/var/lib", "../", "file/"], "/var/file"],
- [["/var/lib", "/../", "file/"], "/file"],
- [["a/b/c/", "../../.."], Deno.cwd()],
- [["."], Deno.cwd()],
- [["/some/dir", ".", "/absolute/"], "/absolute"],
- [["/foo/tmp.3/", "../tmp.3/cycles/root.js"], "/foo/tmp.3/cycles/root.js"],
- ];
-
-Deno.test("resolve", function () {
- posixTests.forEach(function (p) {
- const _p = p[0] as string[];
- const actual = path.posix.resolve.apply(null, _p);
- assertEquals(actual, p[1]);
- });
-});
-
-Deno.test("resolveWin32", function () {
- windowsTests.forEach(function (p) {
- const _p = p[0] as string[];
- const actual = path.win32.resolve.apply(null, _p);
- assertEquals(actual, p[1]);
- });
-});