MCPcopy Index your code
hub / github.com/git-bug/git-bug / Test_repairQuery

Function Test_repairQuery

commands/bug/bug_test.go:12–46  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

10)
11
12func 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
48func TestBug_Format(t *testing.T) {
49 const expOrgMode = `#+TODO: OPEN | CLOSED

Callers

nothing calls this directly

Calls 1

repairQueryFunction · 0.85

Tested by

no test coverage detected