Add readme to tests. Add fileDir option to testament & create nimble test.

This commit is contained in:
Dominik Picheta 2017-09-02 15:03:39 +01:00
commit 9b465a2361
17 changed files with 151 additions and 49 deletions

View file

@ -0,0 +1 @@
proc pkgATest*(): int = 1

View file

@ -0,0 +1 @@
proc pkgBTest*(): int64 = 0xDEADBEEF

View file

@ -0,0 +1 @@
proc pkgBTest*(): int64 = 0

View file

@ -0,0 +1 @@
proc pkgCTest*(): int64 = 1

View file

@ -0,0 +1 @@
proc pkgCTest*(): int64 = 0xDEADBEEF

2
tests/nimble/readme.md Normal file
View file

@ -0,0 +1,2 @@
This directory contains tests for the --nimblePath feature.

View file

@ -0,0 +1,11 @@
discard """
action: run
cmd: "nim $target --nimblePath:$fileDir/nimbleDir/simplePkgs $options $file"
"""
import pkgA/module as A
import pkgB/module as B
import pkgC/module as C
doAssert pkgATest() == 1, "Simple pkgA-0.1.0 wasn't added to path correctly."
doAssert pkgBTest() == 0xDEADBEEF, "pkgB-#head wasn't picked over pkgB-0.1.0"
doAssert pkgCTest() == 0xDEADBEEF, "pkgC-#head wasn't picked over pkgC-#aa11"