add another "task" for nim

This commit is contained in:
Daylin Morgan 2025-02-04 13:57:48 -06:00
parent c081846a89
commit c0a66f617a
Signed by: daylin
GPG key ID: 950D13E9719334AD

View file

@ -103,7 +103,7 @@ task b, fmt"build binary, default: {name}":
task updateLock, "workaround for nimble lock probs": task updateLock, "workaround for nimble lock probs":
let params = forwardArgs("updateLock") let params = forwardArgs("updateLock")
let nimbleFile = let nimbleFile =
if params.len == 1: params[0] if params.len == 1: params[0]
else: projectDir().lastPathPart & ".nimble" else: projectDir().lastPathPart & ".nimble"
if not fileExists nimbleFile: if not fileExists nimbleFile:
@ -114,6 +114,15 @@ task updateLock, "workaround for nimble lock probs":
exec "nimble lock -l" exec "nimble lock -l"
exec "nimble setup -l" exec "nimble setup -l"
task test, "run tests/tester.nim":
const tester = projectDir() / "tests" / "tester.nim"
if fileExists tester:
setCommand "r", tester
else:
quit "expected file at: " & tester
# line delemiter for `nim help` # line delemiter for `nim help`
task _,"_______________": task _,"_______________":
discard discard