summary refs log tree commit diff stats
path: root/testament
diff options
context:
space:
mode:
Diffstat (limited to 'testament')
-rw-r--r--testament/backend.nim4
-rw-r--r--testament/categories.nim6
-rw-r--r--testament/htmlgen.nim2
-rw-r--r--testament/testament.nim14
4 files changed, 13 insertions, 13 deletions
diff --git a/testament/backend.nim b/testament/backend.nim
index 0a6d7d8b9..c2658d6a0 100644
--- a/testament/backend.nim
+++ b/testament/backend.nim
@@ -23,8 +23,8 @@ var
 proc getMachine*(): MachineId =
   var name = execProcess("hostname").string.strip
   if name.len == 0:
-    name = when defined(posix): getEnv("HOSTNAME").string
-           else: getEnv("COMPUTERNAME").string
+    name = when defined(posix): getenv("HOSTNAME").string
+           else: getenv("COMPUTERNAME").string
   if name.len == 0:
     quit "cannot determine the machine name"
 
diff --git a/testament/categories.nim b/testament/categories.nim
index 760c3c5be..e44c3729f 100644
--- a/testament/categories.nim
+++ b/testament/categories.nim
@@ -297,7 +297,7 @@ proc testNimInAction(r: var TResults, cat: Category, options: string) =
     testSpec r, makeTest(filename, options, cat), {targetJS}
 
   template testCPP(filename: untyped) =
-    testSpec r, makeTest(filename, options, cat), {targetCpp}
+    testSpec r, makeTest(filename, options, cat), {targetCPP}
 
   let tests = [
     "niminaction/Chapter1/various1",
@@ -384,7 +384,7 @@ proc findMainFile(dir: string): string =
       elif file.endsWith(".nim"):
         if result.len == 0: result = file
         inc nimFiles
-  if nimFiles != 1: result.setLen(0)
+  if nimFiles != 1: result.setlen(0)
 
 proc manyLoc(r: var TResults, cat: Category, options: string) =
   for kind, dir in os.walkDir("tests/manyloc"):
@@ -567,7 +567,7 @@ const MegaTestCat = "megatest"
 
 proc `&.?`(a, b: string): string =
   # candidate for the stdlib?
-  result = if b.startsWith(a): b else: a & b
+  result = if b.startswith(a): b else: a & b
 
 proc processSingleTest(r: var TResults, cat: Category, options, test: string) =
   let test = testsDir &.? cat.string / test
diff --git a/testament/htmlgen.nim b/testament/htmlgen.nim
index 8e58dd95e..002bd83bc 100644
--- a/testament/htmlgen.nim
+++ b/testament/htmlgen.nim
@@ -63,7 +63,7 @@ proc generateTestResultPanelPartial(outfile: File, testResultRow: JsonNode) =
 
 type
   AllTests = object
-    data: JsonNode
+    data: JSonNode
     totalCount, successCount, ignoredCount, failedCount: int
     successPercentage, ignoredPercentage, failedPercentage: BiggestFloat
 
diff --git a/testament/testament.nim b/testament/testament.nim
index 109ce4ed9..a798544ec 100644
--- a/testament/testament.nim
+++ b/testament/testament.nim
@@ -97,7 +97,7 @@ proc getFileDir(filename: string): string =
   if not result.isAbsolute():
     result = getCurrentDir() / result
 
-proc execCmdEx2(command: string, args: openArray[string]; workingDir, input: string = ""): tuple[
+proc execCmdEx2(command: string, args: openarray[string]; workingDir, input: string = ""): tuple[
                 cmdLine: string,
                 output: TaintedString,
                 exitCode: int] {.tags:
@@ -473,7 +473,7 @@ proc testSpecHelper(r: var TResults, test: TTest, expected: TSpec,
           if exitCode != expected.exitCode:
             r.addResult(test, target, "exitcode: " & $expected.exitCode,
                               "exitcode: " & $exitCode & "\n\nOutput:\n" &
-                              bufB, reExitcodesDiffer)
+                              bufB, reExitCodesDiffer)
           elif (expected.outputCheck == ocEqual and expected.output != bufB) or
               (expected.outputCheck == ocSubstr and expected.output notin bufB):
             given.err = reOutputsDiffer
@@ -536,7 +536,7 @@ proc testC(r: var TResults, test: TTest, action: TTestAction) =
   elif action == actionRun:
     let exeFile = changeFileExt(test.name, ExeExt)
     var (_, exitCode) = execCmdEx(exeFile, options = {poStdErrToStdOut, poUsePath})
-    if exitCode != 0: given.err = reExitcodesDiffer
+    if exitCode != 0: given.err = reExitCodesDiffer
   if given.err == reSuccess: inc(r.passed)
 
 proc testExec(r: var TResults, test: TTest) =
@@ -549,7 +549,7 @@ proc testExec(r: var TResults, test: TTest) =
   if errC == 0:
     given.err = reSuccess
   else:
-    given.err = reExitcodesDiffer
+    given.err = reExitCodesDiffer
     given.msg = outp.string
 
   if given.err == reSuccess: inc(r.passed)
@@ -613,8 +613,8 @@ proc loadSkipFrom(name: string): seq[string] =
       result.add sline
 
 proc main() =
-  os.putEnv "NIMTEST_COLOR", "never"
-  os.putEnv "NIMTEST_OUTPUT_LVL", "PRINT_FAILURES"
+  os.putenv "NIMTEST_COLOR", "never"
+  os.putenv "NIMTEST_OUTPUT_LVL", "PRINT_FAILURES"
 
   azure.init()
   backend.open()
@@ -627,7 +627,7 @@ proc main() =
 
   var p = initOptParser()
   p.next()
-  while p.kind in {cmdLongOption, cmdShortOption}:
+  while p.kind in {cmdLongoption, cmdShortOption}:
     case p.key.string.normalize
     of "print", "verbose": optPrintResults = true
     of "failing": optFailing = true