fix(tests): Update an old test to match correct new behavior

This commit is contained in:
NicolasGB
2026-06-30 12:45:40 +02:00
committed by Nicolas GB
parent f217b16699
commit db06e9a73c
2 changed files with 12 additions and 6 deletions
+11 -5
View File
@@ -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