@@ -49,6 +49,19 @@ T["api"]["fzf_exec"]["function"] = new_set({ parametrize = { { "sync" }, { "asyn
4949 end ,
5050})
5151
52+ T [" api" ][" fzf_exec" ][" rg" ] = new_set ({ parametrize = { { true }, { false }, { 1 } } }, {
53+ function (multiprocess )
54+ helpers .FzfLua .fzf_exec (child ,
55+ [[ 'rg --files -g "!.git" --sort=path']] ,
56+ {
57+ __expect_lines = true ,
58+ debug = 1 ,
59+ multiprocess = multiprocess ,
60+ })
61+ end
62+ })
63+
64+
5265T [" api" ][" fzf_live" ] = new_set ()
5366
5467T [" api" ][" fzf_live" ][" table" ] = function ()
@@ -123,4 +136,38 @@ T["api"]["fzf_live"]["function"] = new_set({ parametrize = { { "sync" }, { "asyn
123136 end ,
124137})
125138
139+ T [" api" ][" fzf_live" ][" rg" ] = new_set ()
140+
141+ T [" api" ][" fzf_live" ][" rg" ][" error" ] = new_set ({ parametrize = { { true }, { false }, { 1 } } }, {
142+ function (multiprocess )
143+ helpers .FzfLua .fzf_live (child , [[ "rg --column --line-number --smart-case"]] , {
144+ __expect_lines = true ,
145+ -- multiprocess==1 should fallback to native (no [DEBUG] line)
146+ -- as no fn_transform or fn_preprocess are present
147+ multiprocess = multiprocess ,
148+ debug = 1 ,
149+ query = " ["
150+ -- fzf_opts = { ["--wrap"] = true },
151+ })
152+ end
153+ })
154+
155+ T [" api" ][" fzf_live" ][" rg" ][" no error" ] = new_set (
156+ { parametrize = { { " [" }, { [[ table of cont]] } } },
157+ {
158+ function (query )
159+ helpers .FzfLua .fzf_live (child ,
160+ string.format (
161+ [[ "rg --column --line-number --smart-case --sort=path -g !tests/ -- <query> 2> %s"]] ,
162+ helpers .IS_WIN () and " nul" or " /dev/null"
163+ ),
164+ {
165+ __expect_lines = true ,
166+ debug = 1 ,
167+ query = query ,
168+ exec_empty_query = true , -- Windows will fail without it
169+ })
170+ end
171+ })
172+
126173return T
0 commit comments