Skip to content

Commit

Permalink
Fix test case
Browse files Browse the repository at this point in the history
  • Loading branch information
goccy committed Dec 22, 2019
1 parent dbcc3e2 commit 90c6152
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
10 changes: 9 additions & 1 deletion parser/parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -502,9 +502,17 @@ func TestNewLineChar(t *testing.T) {
if err != nil {
t.Fatalf("%+v", err)
}
if _, err := parser.ParseBytes(file, 0); err != nil {
ast, err := parser.ParseBytes(file, 0)
if err != nil {
t.Fatalf("%+v", err)
}
actual := fmt.Sprintf("%v\n", ast)
expect := `a: "a"
b: 1
`
if expect != actual {
t.Fatal("unexpected result")
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion parser/testdata/cr.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
a: 1b: 2
a: "a"b: 1
Expand Down
4 changes: 2 additions & 2 deletions parser/testdata/crlf.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
a: 1
b: 2
a: "a"
b: 1
4 changes: 2 additions & 2 deletions parser/testdata/lf.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
a: 1
b: 2
a: "a"
b: 1

0 comments on commit 90c6152

Please sign in to comment.