fix: lua test (#1429)
This commit is contained in:
@@ -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"))
|
||||
|
||||
Reference in New Issue
Block a user