Skip to content

Commit 6f0725b

Browse files
authored
Adds a new test from an issue (#1363)
* Adds a new test from an issue * update test
1 parent 9ffc46b commit 6f0725b

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

tests/trequireflag.nim

+16-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{.used.}
2-
import unittest, os
2+
import unittest, os, strformat, osproc
33
import testscommon
44
from nimblepkg/common import cd
55

@@ -18,4 +18,18 @@ suite "requires flag":
1818
let (outp, exitCode) = execNimble("--requires: stew; results > 0.1", "--solver:sat", "install")
1919
check exitCode == QuitSuccess
2020
check outp.processOutput.inLines("Success: results installed successfully.")
21-
check outp.processOutput.inLines("Success: stew installed successfully.")
21+
check outp.processOutput.inLines("Success: stew installed successfully.")
22+
23+
test "should be able to override the nim version":
24+
let nimqmlDir = getTempDir() / "nimqml"
25+
removeDir(nimqmlDir)
26+
echo "NIMQML DIR is ", nimqmlDir
27+
let cloneCmd = &"git clone https://github.com/seaqt/nimqml-seaqt.git {nimqmlDir}"
28+
check execCmd(cloneCmd) == 0
29+
cd nimqmlDir:
30+
let (output, exitCode) = execNimble("--requires: nim == 2.0.0", "install", "-l")
31+
check exitCode == QuitSuccess
32+
echo "OUTPUT is", output
33+
check output.processOutput.inLines("Success: nimqml installed successfully.")
34+
check output.processOutput.inLines("Installing [email protected]")
35+

0 commit comments

Comments
 (0)