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
@@ -74,6 +74,7 @@ func TestWriteTemplate(t *testing.T) {
tmpfile, err := os.Create(filepath.Join(t.TempDir(), test.testReportName+filepath.Ext(test.expected)))
require.NoError(t, err)
defer tmpfile.Close()
err = reporter.Write(tmpfile, test.findings)
require.NoError(t, err)
@@ -88,7 +89,10 @@ func TestWriteTemplate(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)
})
}
}