2020-10-06 17:54:53 +00:00
|
|
|
mode = ScriptMode.Verbose
|
|
|
|
|
|
|
|
packageName = "zxcvbn"
|
|
|
|
version = "0.1.0"
|
|
|
|
author = "Status Research & Development GmbH"
|
2023-06-08 18:35:50 +00:00
|
|
|
description = "Nim bindings for the zxcvbn-c password strength estimator"
|
2020-10-06 17:54:53 +00:00
|
|
|
license = "Apache License 2.0"
|
|
|
|
skipDirs = @["tests"]
|
|
|
|
|
2023-06-08 18:35:50 +00:00
|
|
|
requires "nim >= 1.6.0",
|
2020-10-06 17:54:53 +00:00
|
|
|
"testutils"
|
|
|
|
|
2022-01-14 23:38:41 +00:00
|
|
|
proc test(args, path: string) =
|
|
|
|
if not dirExists "build":
|
|
|
|
mkDir "build"
|
|
|
|
exec "nim " & getEnv("TEST_LANG", "c") & " " & getEnv("NIMFLAGS") & " " & args &
|
2022-07-26 13:56:14 +00:00
|
|
|
" --outdir:build -r --hints:off --styleCheck:usages --styleCheck:error --skipParentCfg " &
|
|
|
|
path
|
2022-01-14 23:38:41 +00:00
|
|
|
|
2020-10-06 17:54:53 +00:00
|
|
|
task test, "Run all tests":
|
2024-09-10 12:33:03 +00:00
|
|
|
test "--threads:off --mm:refc", "tests/test_all.nim"
|
|
|
|
test "--threads:on --mm:refc", "tests/test_all.nim"
|
2020-10-06 17:54:53 +00:00
|
|
|
|
2023-04-13 21:54:46 +00:00
|
|
|
if (NimMajor, NimMinor) > (1, 6):
|
2024-09-10 12:33:03 +00:00
|
|
|
test "--threads:off --mm:orc", "tests/test_all.nim"
|
|
|
|
test "--threads:on --mm:orc", "tests/test_all.nim"
|