-
-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathregex.nimble
36 lines (31 loc) · 1.21 KB
/
regex.nimble
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Package
version = "0.19.0"
author = "Esteban Castro Borsani (@nitely)"
description = "Linear time regex matching"
license = "MIT"
srcDir = "src"
skipDirs = @["tests", "bench", "docs"]
requires "nim >= 0.19.6"
requires "unicodedb >= 0.7.2"
task test, "Test":
exec "nim c -r -o:bin/regex src/regex.nim"
exec "nim c -r -o:bin/litopt src/regex/litopt.nim"
exec "nim c -r tests/tests.nim"
exec "nim c -r -d:forceRegexAtRuntime tests/tests.nim"
exec "nim c -r -d:forceRegexAtRuntime -d:noRegexOpt tests/tests.nim"
exec "nim c -r -d:noRegexOpt tests/tests.nim"
when (NimMajor, NimMinor, NimPatch) >= (0, 20, 2):
exec "nim c -d:runTestAtCT tests/tests.nim"
# js target should work in older versions, but
# the docker image for CI has it since Nim 1.0.4,
# so I'll only test it there
when (NimMajor, NimMinor, NimPatch) >= (1, 0, 4) and
(NimMajor, NimMinor) != (1, 4): # issue #88
exec "nim js -r src/regex.nim"
exec "nim js -r tests/tests.nim"
exec "nim js -r -d:forceRegexAtRuntime tests/tests.nim"
# Test runnable examples
when (NimMajor, NimMinor) >= (1, 1):
exec "nim doc -o:./docs/ugh/ugh.html ./src/regex.nim"
task docs, "Docs":
exec "nim doc --project -o:./docs ./src/regex.nim"