|
3 | 3 |
|
4 | 4 | {.used.}
|
5 | 5 |
|
6 |
| -import unittest, os, strutils |
| 6 | +import unittest, os, strutils, strformat |
7 | 7 | import testscommon
|
8 | 8 | import nimblepkg/displaymessages
|
9 | 9 | from nimblepkg/common import cd
|
@@ -200,7 +200,9 @@ suite "nimble run":
|
200 | 200 | "-d:danger", "binary", "--arg1", "--arg2")
|
201 | 201 | check exitCode == QuitSuccess
|
202 | 202 | var lines = output.processOutput
|
203 |
| - check lines.inLinesOrdered("Building dependency/binary using c backend") |
| 203 | + const binaryName = when defined(windows): "binary.exe" else: "binary" |
| 204 | + check lines.inLinesOrdered( |
| 205 | + &"Building dependency/{binaryName} using c backend") |
204 | 206 | check lines.inLinesOrdered("--arg1")
|
205 | 207 | check lines.inLinesOrdered("--arg2")
|
206 | 208 |
|
@@ -228,4 +230,6 @@ suite "nimble run":
|
228 | 230 | let (output, exitCode) = execNimble("--package:dependency", "run",
|
229 | 231 | "-d:danger", "bin", "--arg1", "--arg2")
|
230 | 232 | check exitCode == QuitFailure
|
231 |
| - check output.contains(binaryNotDefinedInPkgMsg("bin", "dependency")) |
| 233 | + const binaryName = when defined(windows): "bin.exe" else: "bin" |
| 234 | + check output.contains(binaryNotDefinedInPkgMsg( |
| 235 | + binaryName, "dependency")) |
0 commit comments