Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testament: this now works: "testament r /abspath/to/test.nim" #13358

Merged
merged 1 commit into from
Feb 9, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions testament/testament.nim
Original file line number Diff line number Diff line change
Expand Up @@ -734,11 +734,13 @@ proc main() =
p.next
processPattern(r, pattern, p.cmdLineRest.string, simulate)
of "r", "run":
var subPath = p.key.string
if subPath.isAbsolute: subPath = subPath.relativePath(getCurrentDir())
# at least one directory is required in the path, to use as a category name
let pathParts = split(p.key.string, {DirSep, AltSep})
let pathParts = split(subPath, {DirSep, AltSep})
# "stdlib/nre/captures.nim" -> "stdlib" + "nre/captures.nim"
let cat = Category(pathParts[0])
let subPath = joinPath(pathParts[1..^1])
subPath = joinPath(pathParts[1..^1])
processSingleTest(r, cat, p.cmdLineRest.string, subPath)
of "html":
generateHtml(resultsFile, optFailing)
Expand Down