Support Windows
Build a windows-x64 binary and add install.ps1. The editor, browser links, paths, clipboard images and t3tui upgrade all learn Windows' way of doing things; t3tui tmux says it needs WSL.
This commit is contained in:
1 parent
2845b6fe2b
commit
df2c8e0907
23 files changed
+355
-72
No files matched your search
@@ -0,0 +1,19 @@
|
||||
import { expect, test } from "bun:test";
|
||||
|
||||
import { isWindowsAbsolute, tildify } from "../src/model/paths.ts";
|
||||
|
||||
test("shortens the home folder, on either kind of slash", () => {
|
||||
expect(tildify("/home/me/projects", "/home/me")).toBe("~/projects");
|
||||
expect(tildify("/home/me", "/home/me")).toBe("~");
|
||||
expect(tildify("/home/mean/projects", "/home/me")).toBe("/home/mean/projects");
|
||||
expect(tildify("C:\\Users\\me\\projects", "C:\\Users\\me")).toBe("~\\projects");
|
||||
expect(tildify("C:\\Users\\mean", "C:\\Users\\me")).toBe("C:\\Users\\mean");
|
||||
});
|
||||
|
||||
test("knows a Windows absolute path", () => {
|
||||
expect(isWindowsAbsolute("C:\\a.png")).toBe(true);
|
||||
expect(isWindowsAbsolute("c:/a.png")).toBe(true);
|
||||
expect(isWindowsAbsolute("\\\\server\\share\\a.png")).toBe(true);
|
||||
expect(isWindowsAbsolute("/a.png")).toBe(false);
|
||||
expect(isWindowsAbsolute("a.png")).toBe(false);
|
||||
});
|
||||
Reference in new issue
Block a user