Skip to content

Commit

Permalink
Adds a new test from an issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jmgomez committed Mar 11, 2025
1 parent d9f7374 commit 96d49ab
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions tests/trequireflag.nim
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{.used.}
import unittest, os
import unittest, os, strformat, osproc
import testscommon
from nimblepkg/common import cd

Expand All @@ -18,4 +18,18 @@ suite "requires flag":
let (outp, exitCode) = execNimble("--requires: stew; results > 0.1", "--solver:sat", "install")
check exitCode == QuitSuccess
check outp.processOutput.inLines("Success: results installed successfully.")
check outp.processOutput.inLines("Success: stew installed successfully.")
check outp.processOutput.inLines("Success: stew installed successfully.")

test "should be able to override the nim version":
let nimqmlDir = getTempDir() / "nimqml"
removeDir(nimqmlDir)
echo "NIMQML DIR is ", nimqmlDir
let cloneCmd = &"git clone https://github.com/seaqt/nimqml-seaqt.git {nimqmlDir}"
check execCmd(cloneCmd) == 0
cd nimqmlDir:
let (output, exitCode) = execNimble("--requires: nim == 2.0.0", "install", "-l")
check exitCode == QuitSuccess
echo "OUTPUT is", output
check output.processOutput.inLines("Success: nimqml installed successfully.")
check output.processOutput.inLines("nim-2.0.0/bin/nim for compilation")

0 comments on commit 96d49ab

Please sign in to comment.