(t *testing.T)
| 88 | } |
| 89 | |
| 90 | func TestParseJqInputRejectsMultipleJSONValuesInJSONMode(t *testing.T) { |
| 91 | _, err := parseJqInput("{\"id\":1}\n{\"id\":2}\n", "json") |
| 92 | if err == nil { |
| 93 | t.Fatal("expected error for multiple JSON values in json mode") |
| 94 | } |
| 95 | if err.Error() != "expected a single JSON value" { |
| 96 | t.Fatalf("expected single-value error, got %q", err.Error()) |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | func TestFormatJqResults(t *testing.T) { |
| 101 | got := formatJqResults([]any{"hello", float64(42), true, nil, map[string]any{"id": float64(1)}}) |
nothing calls this directly
no test coverage detected