fix: lua test (#1429)
This commit is contained in:
@@ -206,15 +206,15 @@ describe("llm_tools", function()
|
|||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
describe("run_command", function()
|
describe("bash", function()
|
||||||
it("should execute command and return output", 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.is_nil(err)
|
||||||
assert.equals("test\n", result)
|
assert.equals("test\n", result)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
it("should return error when running outside current directory", function()
|
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.is_false(result)
|
||||||
assert.truthy(err)
|
assert.truthy(err)
|
||||||
assert.truthy(err:find("No permission to access path"))
|
assert.truthy(err:find("No permission to access path"))
|
||||||
|
|||||||
Reference in New Issue
Block a user