mirror of
https://github.com/denoland/std.git
synced 2024-11-22 04:59:05 +00:00
17 lines
560 B
TypeScript
17 lines
560 B
TypeScript
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
import { assertEquals } from "@std/assert";
|
|
import * as windows from "./windows/mod.ts";
|
|
import * as posix from "./posix/mod.ts";
|
|
|
|
Deno.test(`normalize() returns "." if input is empty`, function () {
|
|
assertEquals(posix.normalize(""), ".");
|
|
assertEquals(windows.normalize(""), ".");
|
|
});
|
|
|
|
Deno.test("windows.normalize() normalizes windows specific paths", () => {
|
|
assertEquals(
|
|
windows.normalize("//server/share/dir/file.ext"),
|
|
"\\\\server\\share\\dir\\file.ext",
|
|
);
|
|
});
|