1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-10-29 12:57:46 +00:00

Add a few Checks (#248)

- Add some basic tests for several built-in programs.
 - Preserve the state of the shell between tests
This commit is contained in:
JakobDev
2019-06-14 09:15:12 +02:00
committed by SquidDev
parent 138a2cf08f
commit 717ab69093
12 changed files with 234 additions and 0 deletions

View File

@@ -27,6 +27,10 @@ describe("The shell", function()
shell.setDir(shell.dir())
expect.error(shell.setDir, nil):eq("bad argument #1 (expected string, got nil)")
end)
it("not existing directory", function()
expect.error(shell.setDir, "/rom/nothing"):eq("Not a directory")
end)
end)
describe("shell.setPath", function()