Implement .nimble-link files in the compiler and add tests for them.
This commit is contained in:
parent
9b465a2361
commit
90fa64501f
6 changed files with 29 additions and 4 deletions
|
|
@ -0,0 +1,2 @@
|
|||
../../simplePkgs/pkgA-0.1.0/pkgA.nimble
|
||||
../../simplePkgs/pkgA-0.1.0/
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
../../simplePkgs/pkgB-#head/pkgB.nimble
|
||||
../../simplePkgs/pkgB-#head/
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
../../simplePkgs/pkgB-0.1.0/pkgB.nimble
|
||||
../../simplePkgs/pkgB-0.1.0/
|
||||
9
tests/nimble/tnimblepathlink.nim
Normal file
9
tests/nimble/tnimblepathlink.nim
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
discard """
|
||||
action: run
|
||||
cmd: "nim $target --nimblePath:$fileDir/nimbleDir/linkedPkgs $options $file"
|
||||
"""
|
||||
import pkgA/module as A
|
||||
import pkgB/module as B
|
||||
|
||||
doAssert pkgATest() == 1, "Simple linked pkgA-0.1.0 wasn't added to path correctly."
|
||||
doAssert pkgBTest() == 0xDEADBEEF, "linked pkgB-#head wasn't picked over pkgB-0.1.0"
|
||||
Loading…
Add table
Add a link
Reference in a new issue