Make paths and fingerprints platform-agnostic (#1622)

* test: windows

* fix: make paths platform-agnostic

this change also fixes, or skips, windows failures
This commit is contained in:
Richard Gomez authored and GitHub committed 2025-02-19 19:36:42 -06:00
1 parent 818e32f7a4
commit c2afd56bbe
13 files changed
+535 -91

No files matched your search

+5 -1
View File
@@ -69,6 +69,7 @@ func TestWriteJunit(t *testing.T) {
for _, test := range tests {
tmpfile, err := os.Create(filepath.Join(t.TempDir(), test.testReportName+".xml"))
require.NoError(t, err)
defer tmpfile.Close()
err = reporter.Write(tmpfile, test.findings)
require.NoError(t, err)
@@ -83,6 +84,9 @@ func TestWriteJunit(t *testing.T) {
want, err := os.ReadFile(test.expected)
require.NoError(t, err)
assert.Equal(t, string(want), string(got))
wantStr := lineEndingReplacer.Replace(string(want))
gotStr := lineEndingReplacer.Replace(string(got))
assert.Equal(t, wantStr, gotStr)
}
}