diff --git a/lua/jj/picker.lua b/lua/jj/picker.lua index f5e3737..aad0111 100644 --- a/lua/jj/picker.lua +++ b/lua/jj/picker.lua @@ -328,7 +328,7 @@ end --- it. --- @return jj.picker.conflict_section[]|nil A list of conflict sections or nil if not in a jj repo local function get_conflict_sections() - local output, ok = runner.execute_command_raw( + local output, ok, _ = runner.execute_command_raw( [[jj log --no-graph --quiet -r @ -T 'self.conflicted_files().map(|e| e.path().display() ++ "\0" ++ e.path().absolute() ++ "\0")']] ) if not ok then diff --git a/tests/run_tests.lua b/tests/run_tests.lua index 3777518..e0563d6 100755 --- a/tests/run_tests.lua +++ b/tests/run_tests.lua @@ -659,7 +659,7 @@ run_test("resolve: shellescapes args for external execution", function() end end) -run_test("resolve: shellescapes args for floating execution", function() +run_test("resolve: passes argv for floating execution", function() local terminal = require("jj.ui.terminal") local original_run_floating = terminal.run_floating local original_notify = utils.notify @@ -680,10 +680,16 @@ run_test("resolve: shellescapes args for floating execution", function() args = { "--tool", "my tool" }, filesets = { "dir with spaces/", "glob:*" }, }) - assert_equals( - "'jj' 'resolve' '--revision' 'abc 123' '--tool' 'my tool' 'dir with spaces/' 'glob:*'", - captured_cmd - ) + assert_table_equals({ + "jj", + "resolve", + "--revision", + "abc 123", + "--tool", + "my tool", + "dir with spaces/", + "glob:*", + }, captured_cmd) end) terminal.run_floating = original_run_floating