(t *testing.T)
| 10 | ) |
| 11 | |
| 12 | func Test_repairQuery(t *testing.T) { |
| 13 | cases := []struct { |
| 14 | args []string |
| 15 | output string |
| 16 | }{ |
| 17 | { |
| 18 | []string{""}, |
| 19 | "", |
| 20 | }, |
| 21 | { |
| 22 | []string{"foo"}, |
| 23 | "foo", |
| 24 | }, |
| 25 | { |
| 26 | []string{"foo", "bar"}, |
| 27 | "foo bar", |
| 28 | }, |
| 29 | { |
| 30 | []string{"foo bar", "baz"}, |
| 31 | "\"foo bar\" baz", |
| 32 | }, |
| 33 | { |
| 34 | []string{"foo:bar", "baz"}, |
| 35 | "foo:bar baz", |
| 36 | }, |
| 37 | { |
| 38 | []string{"foo:bar boo", "baz"}, |
| 39 | "foo:\"bar boo\" baz", |
| 40 | }, |
| 41 | } |
| 42 | |
| 43 | for _, tc := range cases { |
| 44 | require.Equal(t, tc.output, repairQuery(tc.args)) |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | func TestBug_Format(t *testing.T) { |
| 49 | const expOrgMode = `#+TODO: OPEN | CLOSED |
nothing calls this directly
no test coverage detected