@@ -84,7 +84,7 @@ license = "MIT"
84
84
requires "nim >= 1.5.1"
85
85
"""
86
86
additionalFileContent = " proc foo() =\n echo \" foo\"\n "
87
- alternativeAdditionalFileContent = " proc bar() =\n echo \" bar\"\n "
87
+ # alternativeAdditionalFileContent = "proc bar() =\n echo \"bar\"\n"
88
88
89
89
definePackageConstants (PkgIdent .main)
90
90
definePackageConstants (PkgIdent .dep1)
@@ -168,7 +168,6 @@ requires "nim >= 1.5.1"
168
168
169
169
proc testLockedVcsRevisions (deps: seq [tuple [name, path: string ]], lockFileName = defaultLockFileName) =
170
170
check lockFileName.fileExists
171
-
172
171
let json = lockFileName.readFile.parseJson
173
172
for (depName, depPath) in deps:
174
173
let expectedVcsRevision = depPath.getVcsRevision
@@ -235,7 +234,7 @@ requires "nim >= 1.5.1"
235
234
result = lockFileName.readFile.parseJson{$ lfjkPackages}{dep}{$ lfjkPkgVcsRevision}.str
236
235
237
236
proc addAdditionalFileAndPushToRemote (
238
- repoPath, remoteName, remotePath, fileContent: string ) =
237
+ repoPath, remoteName, remotePath, fileContent: string ) {. used .} =
239
238
cdNewDir remotePath:
240
239
initRepo (isBare = true )
241
240
cd repoPath:
@@ -508,54 +507,6 @@ requires "nim >= 1.5.1"
508
507
errorMessage = getValidationErrorMessage (dep1PkgName, error)
509
508
check output.processOutput.inLines (errorMessage)
510
509
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
-
559
510
test " check fails because the working copy needs sync" :
560
511
outOfSyncDepsTest (" " ):
561
512
let (output, exitCode) = execNimble (" check" )
0 commit comments