mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-12 06:18:51 +00:00
committed by
Andreas Rumpf
parent
9ea55eccbb
commit
49db2a08ba
@@ -552,9 +552,11 @@ proc removeTrailingDirSep*(path: string): string =
|
||||
proc disableNimblePath*(conf: ConfigRef) =
|
||||
incl conf.globalOptions, optNoNimblePath
|
||||
conf.lazyPaths.setLen(0)
|
||||
conf.nimblePaths.setLen(0)
|
||||
|
||||
proc clearNimblePath*(conf: ConfigRef) =
|
||||
conf.lazyPaths.setLen(0)
|
||||
conf.nimblePaths.setLen(0)
|
||||
|
||||
include packagehandling
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
switch("clearNimblePath")
|
||||
switch("nimblePath", "$projectdir/nimbleDir/simplePkgs")
|
||||
switch("path", "$nimblepath/pkgA-0.1.0")
|
||||
switch("path", "$nimblepath/pkgB-#head")
|
||||
switch("path", "$nimblepath/pkgC-#head")
|
||||
switch("noNimblePath")
|
||||
|
||||
10
tests/nimble/tnimblepathdollarfail.nim
Normal file
10
tests/nimble/tnimblepathdollarfail.nim
Normal file
@@ -0,0 +1,10 @@
|
||||
discard """
|
||||
errmsg: "cannot open file: pkgA/module"
|
||||
"""
|
||||
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"
|
||||
5
tests/nimble/tnimblepathdollarfail.nims
Normal file
5
tests/nimble/tnimblepathdollarfail.nims
Normal file
@@ -0,0 +1,5 @@
|
||||
switch("noNimblePath")
|
||||
switch("nimblePath", "$projectdir/nimbleDir/simplePkgs")
|
||||
switch("path", "$nimblepath/pkgA-0.1.0")
|
||||
switch("path", "$nimblepath/pkgB-#head")
|
||||
switch("path", "$nimblepath/pkgC-#head")
|
||||
Reference in New Issue
Block a user