test that folders containing a - file won't hang forever

This commit is contained in:
Adrien Delorme 2021-03-15 11:50:43 +01:00
parent 8ee8420408
commit fe21ff905d
1 changed files with 4 additions and 0 deletions

View File

@ -86,6 +86,7 @@ func TestFmt_Recursive(t *testing.T) {
"potato": unformattedHCL, "potato": unformattedHCL,
"foo/bar/potato": unformattedHCL, "foo/bar/potato": unformattedHCL,
"bar.pkr.hcl": unformattedHCL, "bar.pkr.hcl": unformattedHCL,
"-": unformattedHCL,
}, },
fileCheck: fileCheck{ fileCheck: fileCheck{
expectedContent: map[string]string{ expectedContent: map[string]string{
@ -94,6 +95,7 @@ func TestFmt_Recursive(t *testing.T) {
"potato": unformattedHCL, "potato": unformattedHCL,
"foo/bar/potato": unformattedHCL, "foo/bar/potato": unformattedHCL,
"bar.pkr.hcl": formattedHCL, "bar.pkr.hcl": formattedHCL,
"-": unformattedHCL,
}}, }},
}, },
{ {
@ -103,12 +105,14 @@ func TestFmt_Recursive(t *testing.T) {
"foo/bar/baz.pkr.hcl": unformattedHCL, "foo/bar/baz.pkr.hcl": unformattedHCL,
"foo/bar/baz/woo.pkrvars.hcl": unformattedHCL, "foo/bar/baz/woo.pkrvars.hcl": unformattedHCL,
"bar.pkr.hcl": unformattedHCL, "bar.pkr.hcl": unformattedHCL,
"-": unformattedHCL,
}, },
fileCheck: fileCheck{ fileCheck: fileCheck{
expectedContent: map[string]string{ expectedContent: map[string]string{
"foo/bar/baz.pkr.hcl": unformattedHCL, "foo/bar/baz.pkr.hcl": unformattedHCL,
"foo/bar/baz/woo.pkrvars.hcl": unformattedHCL, "foo/bar/baz/woo.pkrvars.hcl": unformattedHCL,
"bar.pkr.hcl": formattedHCL, "bar.pkr.hcl": formattedHCL,
"-": unformattedHCL,
}}, }},
}, },
} }