mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-08-28 01:51:43 +00:00
windows: fix XDG-related test failures on Windows
Make the "cache directory paths" test cross-platform by using std.fs.path.join for expected values and a platform-appropriate mock home path, since the function under test uses native path separators. Skip the two shell integration XDG_DATA_DIRS tests on Windows. These tests use hardcoded Unix path separators (:) and Unix default paths (/usr/local/share:/usr/share) which are not applicable on Windows where the path delimiter is ; and XDG_DATA_DIRS is not a standard concept. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -670,6 +670,8 @@ fn setupXdgDataDirs(
|
||||
}
|
||||
|
||||
test "xdg: empty XDG_DATA_DIRS" {
|
||||
if (builtin.os.tag == .windows) return error.SkipZigTest;
|
||||
|
||||
const testing = std.testing;
|
||||
|
||||
var arena = ArenaAllocator.init(testing.allocator);
|
||||
@@ -696,6 +698,8 @@ test "xdg: empty XDG_DATA_DIRS" {
|
||||
}
|
||||
|
||||
test "xdg: existing XDG_DATA_DIRS" {
|
||||
if (builtin.os.tag == .windows) return error.SkipZigTest;
|
||||
|
||||
const testing = std.testing;
|
||||
|
||||
var arena = ArenaAllocator.init(testing.allocator);
|
||||
|
||||
Reference in New Issue
Block a user