@@ -84,7 +84,7 @@ license = "MIT"
8484requires "nim >= 1.5.1"
8585"""
8686 additionalFileContent = " proc foo() =\n echo \" foo\"\n "
87- alternativeAdditionalFileContent = " proc bar() =\n echo \" bar\"\n "
87+ # alternativeAdditionalFileContent = "proc bar() =\n echo \"bar\"\n"
8888
8989 definePackageConstants (PkgIdent .main)
9090 definePackageConstants (PkgIdent .dep1)
@@ -168,7 +168,6 @@ requires "nim >= 1.5.1"
168168
169169 proc testLockedVcsRevisions (deps: seq [tuple [name, path: string ]], lockFileName = defaultLockFileName) =
170170 check lockFileName.fileExists
171-
172171 let json = lockFileName.readFile.parseJson
173172 for (depName, depPath) in deps:
174173 let expectedVcsRevision = depPath.getVcsRevision
@@ -235,7 +234,7 @@ requires "nim >= 1.5.1"
235234 result = lockFileName.readFile.parseJson{$ lfjkPackages}{dep}{$ lfjkPkgVcsRevision}.str
236235
237236 proc addAdditionalFileAndPushToRemote (
238- repoPath, remoteName, remotePath, fileContent: string ) =
237+ repoPath, remoteName, remotePath, fileContent: string ) {. used .} =
239238 cdNewDir remotePath:
240239 initRepo (isBare = true )
241240 cd repoPath:
@@ -508,54 +507,6 @@ requires "nim >= 1.5.1"
508507 errorMessage = getValidationErrorMessage (dep1PkgName, error)
509508 check output.processOutput.inLines (errorMessage)
510509
511- test " cannot sync because the working copy needs merge" :
512- cleanUp ()
513- withPkgListFile:
514- initNewNimblePackage (mainPkgOriginRepoPath, mainPkgRepoPath,
515- @ [dep1PkgName])
516- initNewNimblePackage (dep1PkgOriginRepoPath, dep1PkgRepoPath)
517-
518- cd mainPkgOriginRepoPath:
519- testLockFile (@ [(dep1PkgName, dep1PkgOriginRepoPath)], isNew = true )
520- addFiles (defaultLockFileName)
521- commit (" Add the lock file to version control" )
522-
523- cd mainPkgRepoPath:
524- # Pull the lock file.
525- pull (" origin" )
526- # Create develop file. On this command also a sync file will be
527- # generated.
528- let (_, exitCode) = execNimble (" develop" , & " -a:{ dep1PkgRepoPath} " )
529- check exitCode == QuitSuccess
530-
531- addAdditionalFileAndPushToRemote (
532- dep1PkgRepoPath, dep1PkgRemoteName, dep1PkgRemotePath,
533- additionalFileContent)
534-
535- addAdditionalFileAndPushToRemote (
536- dep1PkgOriginRepoPath, dep1PkgOriginRemoteName, dep1PkgOriginRemotePath,
537- alternativeAdditionalFileContent)
538-
539- cd mainPkgOriginRepoPath:
540- writeDevelopFile (developFileName, @ [], @ [dep1PkgOriginRepoPath])
541- # Update the origin lock file.
542- testLockFile (@ [(dep1PkgName, dep1PkgOriginRepoPath)], isNew = false )
543- addFiles (defaultLockFileName)
544- commit (" Modify the lock file" )
545-
546- cd mainPkgRepoPath:
547- # Pull modified origin lock file. At this point the revisions in the
548- # lock file, sync file and develop mode dependency working copy should
549- # be different from one another.
550- pull (" origin" )
551- let (output, exitCode) = execNimbleYes (" sync" )
552- check exitCode == QuitFailure
553- let
554- error = ValidationError (kind: vekWorkingCopyNeedsMerge,
555- path: dep1PkgRepoPath)
556- errorMessage = getValidationErrorMessage (dep1PkgName, error)
557- check output.processOutput.inLines (errorMessage)
558-
559510 test " check fails because the working copy needs sync" :
560511 outOfSyncDepsTest (" " ):
561512 let (output, exitCode) = execNimble (" check" )
0 commit comments