@@ -46,7 +46,7 @@ suite "lock file":
46
46
`pkgName"PkgRepoPath"` {.used, inject.} = tempDir / `pkgName"PkgName"`
47
47
`pkgName"PkgOriginRepoPath"`{.used, inject.} =
48
48
originsDirPath / `pkgName"PkgName"`
49
- `pkgName"PkgRemoteName"` {.used, inject.} =
49
+ `pkgName"PkgRemoteName"` {.used, inject.} =
50
50
`pkgName"PkgName"` & " Remote"
51
51
`pkgName"PkgRemotePath"` {.used, inject.} =
52
52
additionalRemotesDirPath / `pkgName"PkgRemoteName"`
@@ -327,7 +327,7 @@ requires "nim >= 1.5.1"
327
327
cd dep1PkgOriginRepoPath:
328
328
createBranchAndSwitchToIt(branchName)
329
329
addAdditionalFileToTheRepo(" dep1.nim" , additionalFileContent)
330
-
330
+
331
331
cd dep2PkgOriginRepoPath:
332
332
createBranchAndSwitchToIt(branchName)
333
333
addAdditionalFileToTheRepo(" dep2.nim" , additionalFileContent)
@@ -370,7 +370,7 @@ requires "nim >= 1.5.1"
370
370
# match those in the lock file.
371
371
testLockedVcsRevisions(@ [(dep1PkgName, dep1PkgRepoPath),
372
372
(dep2PkgName, dep2PkgRepoPath)])
373
-
373
+
374
374
test " can sync out of sync develop dependencies" :
375
375
outOfSyncDepsTest(" " ):
376
376
testDepsSync()
@@ -408,8 +408,9 @@ requires "nim >= 1.5.1"
408
408
@ [dep1PkgName])
409
409
initNewNimblePackage(dep1PkgOriginRepoPath, dep1PkgRepoPath)
410
410
cd dep1PkgRepoPath:
411
- # Modify the Nimble file to make the working copy not clean.
412
- discard initNewNimbleFile(dep1PkgRepoPath, @ [dep2PkgName])
411
+ # Add a file to make the working copy not clean.
412
+ writeFile(" dirty" , " dirty" )
413
+ addFiles(" dirty" )
413
414
cd mainPkgRepoPath:
414
415
writeDevelopFile(developFileName, @ [], @ [dep1PkgRepoPath])
415
416
let (output, exitCode) = execNimbleYes(" lock" )
@@ -528,3 +529,25 @@ requires "nim >= 1.5.1"
528
529
path: dep1PkgRepoPath)
529
530
errorMessage = getValidationErrorMessage(dep1PkgName, error)
530
531
check output.processOutput.inLines(errorMessage)
532
+
533
+ test " can lock with dirty non-deps in develop file" :
534
+ cleanUp()
535
+ withPkgListFile:
536
+ initNewNimblePackage(mainPkgOriginRepoPath, mainPkgRepoPath,
537
+ @ [dep1PkgName])
538
+ initNewNimblePackage(dep1PkgOriginRepoPath, dep1PkgRepoPath)
539
+ initNewNimblePackage(dep2PkgOriginRepoPath, dep2PkgRepoPath)
540
+
541
+ cd dep2PkgRepoPath:
542
+ # make dep2 dirty
543
+ writeFile(" dirty" , " dirty" )
544
+ addFiles(" dirty" )
545
+
546
+
547
+ cd mainPkgRepoPath:
548
+ # make main dirty
549
+ writeFile(" dirty" , " dirty" )
550
+ addFiles(" dirty" )
551
+ writeDevelopFile(developFileName, @ [],
552
+ @ [dep2PkgRepoPath, mainPkgRepoPath, dep1PkgRepoPath])
553
+ testLockFile(@ [(dep1PkgName, dep1PkgRepoPath)], isNew = true )
0 commit comments