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
@@ -53,6 +53,7 @@ func TestWriteCSV(t *testing.T) {
t.Run(test.testReportName, func(t *testing.T) {
tmpfile, err := os.Create(filepath.Join(t.TempDir(), test.testReportName+".csv"))
require.NoError(t, err)
defer tmpfile.Close()
err = reporter.Write(tmpfile, test.findings)
require.NoError(t, err)
@@ -67,7 +68,10 @@ func TestWriteCSV(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)
})
}
}