(t *testing.T)
| 800 | } |
| 801 | |
| 802 | func TestJQCorrectlyQueriesMultilineInputFields(t *testing.T) { |
| 803 | t.Parallel() |
| 804 | input := `{"a":1}` + "\n" + `{"a":2}` |
| 805 | want := "1\n2\n" |
| 806 | got, err := script.Echo(input).JQ(".a").String() |
| 807 | if err != nil { |
| 808 | t.Fatal(err) |
| 809 | } |
| 810 | if want != got { |
| 811 | t.Error(cmp.Diff(want, got)) |
| 812 | } |
| 813 | } |
| 814 | |
| 815 | func TestJQCorrectlyQueriesMultilineInputArrays(t *testing.T) { |
| 816 | t.Parallel() |