No description
Find a file
2018-05-26 22:29:51 -07:00
findtests.nim Added support for recursive relative paths 2018-05-26 22:29:51 -07:00
findtests.nimble Initial commit 2018-05-17 22:27:09 -07:00
LICENSE Initial commit 2018-05-17 22:27:09 -07:00
README.md Ready to push 2018-05-18 00:47:50 -07:00

findtests

A helper module for writing unit tests with nake or similar build system. Automatically discovers all tests in a test directory, along with all of their dependencies, so one can determine whether a given test needs to be rebuilt.

Example usage:

import nake
import findtests

task "test", "Update module builds and run tests":
  for testSrcs in findTests("./tests"):
    let target = testSrcs[0][0..^5]  # the build target (without .nim)
    if needsRefresh(target, testSrcs):
      direShell(nimExe, "c", "-r", target)