From c0a66f617adcb6c0e7b6e0d60a183dcd291ba183 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Tue, 4 Feb 2025 13:57:48 -0600 Subject: [PATCH] add another "task" for nim --- home/private_dot_config/nim/config.nims | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/home/private_dot_config/nim/config.nims b/home/private_dot_config/nim/config.nims index 586b288..1f141b9 100644 --- a/home/private_dot_config/nim/config.nims +++ b/home/private_dot_config/nim/config.nims @@ -103,7 +103,7 @@ task b, fmt"build binary, default: {name}": task updateLock, "workaround for nimble lock probs": let params = forwardArgs("updateLock") - let nimbleFile = + let nimbleFile = if params.len == 1: params[0] else: projectDir().lastPathPart & ".nimble" if not fileExists nimbleFile: @@ -114,6 +114,15 @@ task updateLock, "workaround for nimble lock probs": exec "nimble lock -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` task _,"_______________": discard