Skip to content

Commit 549ef26

Browse files
committed
Windows fix for TestGraphFlagExcluded
1 parent d8a2dcd commit 549ef26

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

configstack/module_test.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,12 @@ digraph {
128128
"h" -> "c";
129129
}
130130
`)
131-
assert.Contains(t, stdout.String(), expected)
131+
132+
// clean string to work in cross-platform way
133+
actual := strings.ReplaceAll(stdout.String(), "\r\n", "\n")
134+
expected = strings.ReplaceAll(expected, "\r\n", "\n")
135+
136+
assert.Contains(t, actual, expected)
132137
}
133138

134139
func TestCheckForCycles(t *testing.T) {

0 commit comments

Comments
 (0)