@@ -46,7 +46,7 @@ suite "lock file":
4646 `pkgName"PkgRepoPath"` {.used , inject .} = tempDir / `pkgName"PkgName"`
4747 `pkgName"PkgOriginRepoPath"`{.used , inject .} =
4848 originsDirPath / `pkgName"PkgName"`
49- `pkgName"PkgRemoteName"` {.used , inject .} =
49+ `pkgName"PkgRemoteName"` {.used , inject .} =
5050 `pkgName"PkgName"` & " Remote"
5151 `pkgName"PkgRemotePath"` {.used , inject .} =
5252 additionalRemotesDirPath / `pkgName"PkgRemoteName"`
@@ -327,7 +327,7 @@ requires "nim >= 1.5.1"
327327 cd dep1PkgOriginRepoPath:
328328 createBranchAndSwitchToIt (branchName)
329329 addAdditionalFileToTheRepo (" dep1.nim" , additionalFileContent)
330-
330+
331331 cd dep2PkgOriginRepoPath:
332332 createBranchAndSwitchToIt (branchName)
333333 addAdditionalFileToTheRepo (" dep2.nim" , additionalFileContent)
@@ -370,7 +370,7 @@ requires "nim >= 1.5.1"
370370 # match those in the lock file.
371371 testLockedVcsRevisions (@ [(dep1PkgName, dep1PkgRepoPath),
372372 (dep2PkgName, dep2PkgRepoPath)])
373-
373+
374374 test " can sync out of sync develop dependencies" :
375375 outOfSyncDepsTest (" " ):
376376 testDepsSync ()
@@ -408,8 +408,9 @@ requires "nim >= 1.5.1"
408408 @ [dep1PkgName])
409409 initNewNimblePackage (dep1PkgOriginRepoPath, dep1PkgRepoPath)
410410 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" )
413414 cd mainPkgRepoPath:
414415 writeDevelopFile (developFileName, @ [], @ [dep1PkgRepoPath])
415416 let (output, exitCode) = execNimbleYes (" lock" )
@@ -528,3 +529,25 @@ requires "nim >= 1.5.1"
528529 path: dep1PkgRepoPath)
529530 errorMessage = getValidationErrorMessage (dep1PkgName, error)
530531 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