Skip to content

Commit

Permalink
Add a test to reproduce #907
Browse files Browse the repository at this point in the history
  • Loading branch information
ikedam committed Jul 24, 2021
1 parent 5af8e63 commit 75cd389
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions stores/yaml/store_test.go
Expand Up @@ -198,6 +198,15 @@ func TestEmpty2(t *testing.T) {
}
*/

func TestEmpty3(t *testing.T) {
branches, err := (&Store{}).LoadPlainFile([]byte("{}\n"))
assert.Nil(t, err)
assert.Equal(t, len(branches), 1)
bytes, err := (&Store{}).EmitPlainFile(branches)
assert.Nil(t, err)
assert.Equal(t, "{}\n", string(bytes))
}

func TestComment6(t *testing.T) {
branches, err := (&Store{}).LoadPlainFile(COMMENT_6)
assert.Nil(t, err)
Expand Down

0 comments on commit 75cd389

Please sign in to comment.