(filesToCheck testCaseList, foldersToCheck testCaseList)
| 383 | } |
| 384 | |
| 385 | func makeRemoveAndRenameTestCases(filesToCheck testCaseList, foldersToCheck testCaseList) (testCaseList, testCaseList) { |
| 386 | for n, array := range []testCaseList{filesToCheck, foldersToCheck} { |
| 387 | for _, f := range array { |
| 388 | if f.path == "testFolder" { |
| 389 | continue |
| 390 | } |
| 391 | |
| 392 | removeEquivalent := checkedFileOrFolder{ |
| 393 | path: f.path + "_Remove", |
| 394 | shouldExistInLocal: f.shouldExistInLocal, |
| 395 | shouldExistInRemote: f.shouldExistInRemote, |
| 396 | editLocation: f.editLocation, |
| 397 | isSymLink: f.isSymLink, |
| 398 | } |
| 399 | array = append(array, removeEquivalent) |
| 400 | |
| 401 | renameEquivalent := checkedFileOrFolder{ |
| 402 | path: f.path + "_RenameToFullContext", |
| 403 | shouldExistInLocal: f.shouldExistInLocal, |
| 404 | shouldExistInRemote: f.shouldExistInRemote, |
| 405 | editLocation: f.editLocation, |
| 406 | isSymLink: f.isSymLink, |
| 407 | } |
| 408 | array = append(array, renameEquivalent) |
| 409 | |
| 410 | isFullyIncluded, _ := regexp.Compile(`(testFolder\/)?(testFile|testFolder)(Local|Remote)$`) |
| 411 | if isFullyIncluded.MatchString(f.path) { |
| 412 | renameEquivalent = checkedFileOrFolder{ |
| 413 | path: f.path + "_RenameToOutside", |
| 414 | shouldExistInLocal: f.shouldExistInLocal, |
| 415 | shouldExistInRemote: f.shouldExistInRemote, |
| 416 | editLocation: f.editLocation, |
| 417 | isSymLink: f.isSymLink, |
| 418 | } |
| 419 | array = append(array, renameEquivalent) |
| 420 | renameEquivalent = checkedFileOrFolder{ |
| 421 | path: f.path + "_RenameToIgnore", |
| 422 | shouldExistInLocal: f.shouldExistInLocal, |
| 423 | shouldExistInRemote: f.shouldExistInRemote, |
| 424 | editLocation: f.editLocation, |
| 425 | isSymLink: f.isSymLink, |
| 426 | } |
| 427 | array = append(array, renameEquivalent) |
| 428 | renameEquivalent = checkedFileOrFolder{ |
| 429 | path: f.path + "_RenameToNoDownload", |
| 430 | shouldExistInLocal: f.shouldExistInLocal, |
| 431 | shouldExistInRemote: f.shouldExistInRemote, |
| 432 | editLocation: f.editLocation, |
| 433 | isSymLink: f.isSymLink, |
| 434 | } |
| 435 | array = append(array, renameEquivalent) |
| 436 | renameEquivalent = checkedFileOrFolder{ |
| 437 | path: f.path + "_RenameToNoUpload", |
| 438 | shouldExistInLocal: f.shouldExistInLocal, |
| 439 | shouldExistInRemote: f.shouldExistInRemote, |
| 440 | editLocation: f.editLocation, |
| 441 | isSymLink: f.isSymLink, |
| 442 | } |
no test coverage detected