(t *testing.T)
| 528 | } |
| 529 | |
| 530 | func TestSelectErrors(t *testing.T) { |
| 531 | tests := []struct { |
| 532 | in string |
| 533 | err error |
| 534 | }{ |
| 535 | {in: "select(.a) && { .b }", err: newParseError("syntax error: unexpected &&, expecting with", 0, 12)}, |
| 536 | {in: "select()", err: newParseError("syntax error: unexpected )", 1, 8)}, |
| 537 | } |
| 538 | |
| 539 | for _, tc := range tests { |
| 540 | t.Run(tc.in, func(t *testing.T) { |
| 541 | _, err := Parse(tc.in) |
| 542 | |
| 543 | require.Equal(t, tc.err, err) |
| 544 | }) |
| 545 | } |
| 546 | } |
| 547 | |
| 548 | func TestSelectOperation(t *testing.T) { |
| 549 | tests := []struct { |
nothing calls this directly
no test coverage detected