2023-05-14 21:16:58 +01:00
|
|
|
local fs = require("@lune/fs")
|
|
|
|
local process = require("@lune/process")
|
2023-06-08 10:21:00 +01:00
|
|
|
local task = require("@lune/task")
|
2023-05-14 21:16:58 +01:00
|
|
|
|
2023-02-06 00:13:58 +00:00
|
|
|
local function assert(condition, err)
|
|
|
|
if not condition then
|
2023-02-06 03:25:36 +00:00
|
|
|
task.spawn(error, err)
|
2023-02-06 00:13:58 +00:00
|
|
|
process.exit(0)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
local path = process.cwd .. "asdfghjkl"
|
|
|
|
|
|
|
|
assert(fs.isDir(path), "Process should exit with success")
|
|
|
|
assert(fs.isDir(path), "Process should exit with success")
|
|
|
|
assert(fs.isDir(path), "Process should exit with success")
|
|
|
|
|
|
|
|
error("Process should have exited with success...")
|