Skip to content

Commit

Permalink
test: strip \r for windows quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdecaf committed Feb 12, 2024
1 parent af1e882 commit e08f021
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/xmlq/xmlq_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package xmlq

import (
"bytes"
"encoding/xml"
"fmt"
"os"
Expand Down Expand Up @@ -58,6 +59,9 @@ func marshal(t *testing.T, path, expected string) {
bs, err := os.ReadFile(expected)
require.NoError(t, err)

// Strip windows quotes
bs = bytes.ReplaceAll(bs, []byte("\r\n"), []byte("\n"))

require.Equal(t, string(bs), string(output))
}

Expand Down

0 comments on commit e08f021

Please sign in to comment.