fix: skip file permission tests on Windows

Windows doesn't support Unix-style file permissions, so these tests
will always fail. Skip the permission verification on Windows while
still testing the core functionality (file creation, content).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-11-24 22:23:45 -08:00
parent 071fc96206
commit 45464ca3f9
2 changed files with 19 additions and 2 deletions

View File

@@ -8,6 +8,11 @@ import (
)
func TestFixGitignore_FilePermissions(t *testing.T) {
// Skip on Windows as it doesn't support Unix-style file permissions
if runtime.GOOS == "windows" {
t.Skip("Skipping file permissions test on Windows")
}
tests := []struct {
name string
setupFunc func(t *testing.T, tmpDir string) // setup before fix
@@ -194,6 +199,11 @@ func TestFixGitignore_FileOwnership(t *testing.T) {
}
func TestFixGitignore_DoesNotLoosenPermissions(t *testing.T) {
// Skip on Windows as it doesn't support Unix-style file permissions
if runtime.GOOS == "windows" {
t.Skip("Skipping file permissions test on Windows")
}
tmpDir := t.TempDir()
// Change to tmpDir for the test