File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,8 +16,9 @@ func normalizeDiff(diff string) string {
1616 reSpaces := regexp .MustCompile (`\s+` )
1717
1818 normDiff := strings .TrimSpace (diff )
19- normDiff = reSpaces . ReplaceAllString ( normDiff , " " )
19+ normDiff = strings . ReplaceAll ( diff , " \n " , " " )
2020 normDiff = reAnsiEscape .ReplaceAllString (normDiff , "" )
21+ normDiff = reSpaces .ReplaceAllString (normDiff , " " )
2122 return strings .ToLower (normDiff )
2223}
2324
@@ -38,6 +39,10 @@ func TestHasTestOpt(t *testing.T) {
3839 opts : []string {"test" , "hoge" },
3940 want : false ,
4041 },
42+ {
43+ opts : []string {"-t" },
44+ want : false ,
45+ },
4146 }
4247
4348 for _ , param := range params {
@@ -116,9 +121,10 @@ func TestExecJsonnetFmt(t *testing.T) {
116121 text : `...
117122 metadata: {
118123 name: name,
119- namespace: namespace, // missing the trailing comma
124+ namespace: namespace,
120125 },
121- }` ,
126+ }
127+ ... ` ,
122128 numInsert : 1 ,
123129 numDelete : 0 ,
124130 },
Original file line number Diff line number Diff line change 1515 kind: 'SubNamespace',
1616 metadata: {
1717 name: name,
18- namespace: namespace // missing the trailing comma
18+ namespace: namespace
1919 },
2020 }
2121` )
You can’t perform that action at this time.
0 commit comments