mirror of
https://github.com/zoriya/jj.nvim.git
synced 2026-08-14 23:23:20 +00:00
fix(tests): Update an old test to match correct new behavior
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
+11
-5
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user