Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix test in windows
  • Loading branch information
jsoriano committed Jul 21, 2025
commit 0adf6fa7be3b9f71837fa44524103a08e1a101ce
8 changes: 7 additions & 1 deletion internal/files/linkedfiles_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"io"
"os"
"path/filepath"
"runtime"
"strings"
"testing"

Expand Down Expand Up @@ -782,6 +783,11 @@ func TestLinksFS_ErrorConditions(t *testing.T) {
lfs, err := NewLinksFS(root, workDir)
require.NoError(t, err)

notFoundErrorMsg := "no such file or directory"
if runtime.GOOS == "windows" {
notFoundErrorMsg = "The system cannot find the file specified"
}

tests := []struct {
name string
fileName string
Expand All @@ -790,7 +796,7 @@ func TestLinksFS_ErrorConditions(t *testing.T) {
{
name: "broken link to non-existent file",
fileName: "broken.txt.link",
errorMsg: "no such file or directory",
errorMsg: notFoundErrorMsg,
},
{
name: "invalid link file format",
Expand Down