Skip to content

Commit

Permalink
Adds features-setup coverage (#1353)
Browse files Browse the repository at this point in the history
* Adds features-setup coverage

* rename dep
  • Loading branch information
jmgomez authored Mar 4, 2025
1 parent bb32cea commit 48ce3e1
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/tsetupcommand.nim
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,18 @@ suite "setup command":
check configFileContent.contains("--noNimblePath")

cleanFiles nimblePathsFileName, nimbleConfigFileName, "nimble.lock", ".gitignore"

test "should add feature requirements to the nimble.paths file when activating the feature":
cd "features":
let (_, exitCode) = execNimble("--parser:declarative", "--features:feature1", "setup")
check exitCode == QuitSuccess
let nimblePathsFileContent = nimblePathsFileName.readFile
check nimblePathsFileContent.contains("stew")

test "should not add feature requirements to the nimble.paths file when not activating the feature":
cd "features":
let (_, exitCode) = execNimble("--parser:declarative", "setup")
check exitCode == QuitSuccess
let nimblePathsFileContent = nimblePathsFileName.readFile
check not nimblePathsFileContent.contains("stew")

0 comments on commit 48ce3e1

Please sign in to comment.