git-p4: simple branch tests edits

More review comments. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Vitor Antunes <vitor.hda@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Pete Wyckoff committed Aug 29, 2011 at 10:32 UTC 9aa7c16f5ec96de9b5fe7b272832fbb061d1fee2
1 file changed +8 -11
t/t9800-git-p4.sh
+8 -11
@@ -413,7 +413,7 @@ test_expect_success 'add simple p4 branches' '
413 cd branch1 &&
414 echo file1 >file1 &&
415 echo file2 >file2 &&
416 - p4 add file* &&
416 + p4 add file1 file2 &&
417 p4 submit -d "branch1" &&
418 p4 integrate //depot/branch1/... //depot/branch2/... &&
419 p4 submit -d "branch2" &&
@@ -433,13 +433,12 @@ test_expect_success 'add simple p4 branches' '
433 # Finally, make an update to branch1 on P4 side to check if it is imported
434 # correctly by git-p4.
435 test_expect_success 'git-p4 clone simple branches' '
436 - git init "$git" &&
436 + test_when_finished cleanup_git &&
437 + test_create_repo "$git" &&
438 cd "$git" &&
439 git config git-p4.branchList branch1:branch2 &&
440 git config --add git-p4.branchList branch1:branch3 &&
440 - cd "$TRASH_DIRECTORY" &&
441 - "$GITP4" clone --dest="$git" --detect-branches //depot@all &&
442 - cd "$git" &&
441 + "$GITP4" clone --dest=. --detect-branches //depot@all &&
442 git log --all --graph --decorate --stat &&
443 git reset --hard p4/depot/branch1 &&
444 test -f file1 &&
@@ -449,7 +448,7 @@ test_expect_success 'git-p4 clone simple branches' '
448 git reset --hard p4/depot/branch2 &&
449 test -f file1 &&
450 test -f file2 &&
452 - test \! -z file3 &&
451 + test ! -f file3 &&
452 ! grep -q update file2 &&
453 git reset --hard p4/depot/branch3 &&
454 test -f file1 &&
@@ -459,14 +458,12 @@ test_expect_success 'git-p4 clone simple branches' '
458 cd "$cli" &&
459 cd branch1 &&
460 p4 edit file2 &&
462 - echo file2_ >> file2 &&
463 - p4 submit -d "update file2 in branch3" &&
461 + echo file2_ >>file2 &&
462 + p4 submit -d "update file2 in branch1" &&
463 cd "$git" &&
464 git reset --hard p4/depot/branch1 &&
465 "$GITP4" rebase &&
467 - grep -q file2_ file2 &&
468 - cd "$TRASH_DIRECTORY" &&
469 - rm -rf "$git" && mkdir "$git"
466 + grep -q file2_ file2
467 '
468
469 test_expect_success 'shutdown' '