fix: lua test (#1429)

This commit is contained in:
yetone
2025-02-28 14:57:01 +08:00
committed by GitHub
parent 6d24da510e
commit 4cbba9f95e

View File

@@ -206,15 +206,15 @@ describe("llm_tools", function()
end)
end)
describe("run_command", function()
describe("bash", function()
it("should execute command and return output", function()
local result, err = LlmTools.run_command({ rel_path = ".", command = "echo 'test'" })
local result, err = LlmTools.bash({ rel_path = ".", command = "echo 'test'" })
assert.is_nil(err)
assert.equals("test\n", result)
end)
it("should return error when running outside current directory", function()
local result, err = LlmTools.run_command({ rel_path = "../outside_project", command = "echo 'test'" })
local result, err = LlmTools.bash({ rel_path = "../outside_project", command = "echo 'test'" })
assert.is_false(result)
assert.truthy(err)
assert.truthy(err:find("No permission to access path"))