~mdw
/
stgit
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
stgit.el: Minor documentation corrections
[stgit]
/
t
/
t2800-goto-subdir.sh
diff --git
a/t/t2800-goto-subdir.sh
b/t/t2800-goto-subdir.sh
index
fcad7da
..
5960bd6
100755
(executable)
--- a/
t/t2800-goto-subdir.sh
+++ b/
t/t2800-goto-subdir.sh
@@
-25,18
+25,19
@@
cat > expected2.txt <<EOF
bar
EOF
test_expect_success 'Goto in subdirectory (just pop)' '
bar
EOF
test_expect_success 'Goto in subdirectory (just pop)' '
- (cd foo && stg goto p1) &&
+ (cd foo && stg goto
--keep
p1) &&
cat foo/bar > actual.txt &&
cat foo/bar > actual.txt &&
-
diff -u
expected1.txt actual.txt &&
+
test_cmp
expected1.txt actual.txt &&
ls foo > actual.txt &&
ls foo > actual.txt &&
-
diff -u
expected2.txt actual.txt
+
test_cmp
expected2.txt actual.txt
'
test_expect_success 'Prepare conflicting goto' '
stg delete p2
'
'
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
=======
foo1
<<<<<<< current:foo/bar
=======
@@
-44,16
+45,28
@@
foo2
foo3
>>>>>>> patched:foo/bar
EOF
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
test_expect_success 'Goto in subdirectory (conflicting push)' '
cat > expected2.txt <<EOF
bar
EOF
test_expect_success 'Goto in subdirectory (conflicting push)' '
- (cd foo && stg goto p3) ;
+ (cd foo && stg goto
--keep
p3) ;
[ $? -eq 3 ] &&
cat foo/bar > actual.txt &&
[ $? -eq 3 ] &&
cat foo/bar > actual.txt &&
- diff -u expected1.txt actual.txt &&
+ ( test_cmp expected1a.txt actual.txt \
+ || test_cmp expected1b.txt actual.txt ) &&
ls foo > actual.txt &&
ls foo > actual.txt &&
-
diff -u
expected2.txt actual.txt
+
test_cmp
expected2.txt actual.txt
'
test_done
'
test_done