Skip to content

Commit

Permalink
test(config): fix broken test on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
themantre committed Nov 10, 2024
1 parent cf5b4c7 commit 55d99af
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,8 @@ func TestExampleConfig(t *testing.T) {
strings.HasPrefix(line, " # ") ||
strings.HasPrefix(line, " # ") ||
strings.HasPrefix(line, " # ")) {
if line != "" {
exampleToml += line
exampleToml += "\n"
}
exampleToml += line
exampleToml += "\n"
}
}

Expand All @@ -152,6 +150,9 @@ func TestExampleConfig(t *testing.T) {
exampleToml = strings.ReplaceAll(exampleToml, "\n\n", "\n")
defaultToml = strings.ReplaceAll(defaultToml, "\n\n", "\n")

defaultToml = strings.TrimSpace(defaultToml)
exampleToml = strings.TrimSpace(exampleToml)

assert.Equal(t, defaultToml, exampleToml)
}

Expand Down

0 comments on commit 55d99af

Please sign in to comment.