chiark / gitweb /
Merge commit 'kha/safe'
authorCatalin Marinas <catalin.marinas@gmail.com>
Fri, 17 Jul 2009 13:05:23 +0000 (14:05 +0100)
committerCatalin Marinas <catalin.marinas@gmail.com>
Fri, 17 Jul 2009 13:05:23 +0000 (14:05 +0100)
t/t2800-goto-subdir.sh

index 855972b6669799bc5c95ad11f50dc0c556adebac..5960bd65ae297749d0e025e3d6d4877a77ab77b4 100755 (executable)
@@ -36,7 +36,8 @@ test_expect_success 'Prepare conflicting goto' '
     stg delete p2
 '
 
-cat > expected1.txt <<EOF
+# git gives this result before commit 606475f3 ...
+cat > expected1a.txt <<EOF
 foo1
 <<<<<<< current:foo/bar
 =======
@@ -44,6 +45,17 @@ foo2
 foo3
 >>>>>>> patched:foo/bar
 EOF
+
+# ... and this result after commit 606475f3.
+cat > expected1b.txt <<EOF
+foo1
+<<<<<<< current
+=======
+foo2
+foo3
+>>>>>>> patched
+EOF
+
 cat > expected2.txt <<EOF
 bar
 EOF
@@ -51,7 +63,8 @@ test_expect_success 'Goto in subdirectory (conflicting push)' '
     (cd foo && stg goto --keep p3) ;
     [ $? -eq 3 ] &&
     cat foo/bar > actual.txt &&
-    test_cmp expected1.txt actual.txt &&
+    ( test_cmp expected1a.txt actual.txt \
+      || test_cmp expected1b.txt actual.txt ) &&
     ls foo > actual.txt &&
     test_cmp expected2.txt actual.txt
 '