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

Adds a new test from an issue #1363

Merged
merged 2 commits into from
Mar 12, 2025
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
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("Installing [email protected]")

Loading