changeset 244:ea0728d8cdc2

tests: work around output changes in newer git versions In particular, newer gits no longer show ... in merged revisions, use ' instead of " when checking out a branch, and changed the output format of commit information completely.
author Augie Fackler <durin42@gmail.com>
date Tue, 11 Aug 2009 00:13:37 -0400
parents 53b731d2a3e2
children 93900665c4da
files tests/test-empty-working-tree tests/test-empty-working-tree.out tests/test-merge tests/test-merge.out tests/test-octopus tests/test-octopus.out tests/test-pull tests/test-push tests/test-tree-decomposition tests/test-tree-decomposition.out
diffstat 10 files changed, 17 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-empty-working-tree
+++ b/tests/test-empty-working-tree
@@ -21,7 +21,7 @@
 cd gitrepo
 git init | python -c "import sys; print sys.stdin.read().replace('$(dirname $(pwd))/', '')"
 
-git commit --allow-empty -m empty
+git commit --allow-empty -m empty | sed -E 's/.*([0-9a-f]{7})[]:]/Commit \1/'
 
 cd ..
 mkdir gitrepo2
--- a/tests/test-empty-working-tree.out
+++ b/tests/test-empty-working-tree.out
@@ -1,6 +1,6 @@
 Initialized empty Git repository in gitrepo/.git/
 
-Created initial commit 6782568: empty
+Commit 6782568 empty
 Initialized empty Git repository in gitrepo2/.git/
 
 importing Hg objects into Git
--- a/tests/test-merge
+++ b/tests/test-merge
@@ -34,18 +34,18 @@
 git add alpha
 commit -m 'add alpha'
 
-git checkout -b beta
+git checkout -b beta 2>&1 | sed s/\'/\"/g
 echo beta > beta
 git add beta
 commit -m 'add beta'
 
-git checkout master
+git checkout master 2>&1 | sed s/\'/\"/g
 echo gamma > gamma
 git add gamma
 commit -m 'add gamma'
 
 # clean merge
-git merge beta
+git merge beta | sed 's/\.{3}//'
 
 cd ..
 mkdir gitrepo2
--- a/tests/test-merge.out
+++ b/tests/test-merge.out
@@ -23,7 +23,7 @@
 at: 0/4
 creating and sending data
 commit 5806851511aaf3bfe813ae3a86c5027165fa9b96
-Merge: e5023f9... 9497a4e...
+Merge: e5023f9 9497a4e
 Author: test <test@example.org>
 Date:   Mon Jan 1 00:00:12 2007 +0000
 
--- a/tests/test-octopus
+++ b/tests/test-octopus
@@ -35,22 +35,22 @@
 git add alpha
 commit -m 'add alpha'
 
-git checkout -b branch1
+git checkout -b branch1 2>&1 | sed s/\'/\"/g
 echo beta > beta
 git add beta
 commit -m 'add beta'
 
-git checkout -b branch2 master
+git checkout -b branch2 master 2>&1 | sed s/\'/\"/g
 echo gamma > gamma
 git add gamma
 commit -m 'add gamma'
 
-git checkout master
+git checkout master 2>&1 | sed s/\'/\"/g
 echo delta > delta
 git add delta
 commit -m 'add delta'
 
-git merge branch1 branch2
+git merge branch1 branch2 | sed 's/\.{3}//'
 
 cd ..
 mkdir gitrepo2
--- a/tests/test-octopus.out
+++ b/tests/test-octopus.out
@@ -70,7 +70,7 @@
 at: 0/6
 creating and sending data
 commit f0c7ec180419a130636d0c333fc34c1462cab4b5
-Merge: d8e22dd... 9497a4e... e5023f9...
+Merge: d8e22dd 9497a4e e5023f9
 Author: test <test@example.org>
 Date:   Mon Jan 1 00:00:13 2007 +0000
 
--- a/tests/test-pull
+++ b/tests/test-pull
@@ -36,7 +36,7 @@
 
 git tag alpha
 
-git checkout -b beta
+git checkout -b beta  2>&1 | sed s/\'/\"/g
 echo beta > beta
 git add beta
 commit -m 'add beta'
--- a/tests/test-push
+++ b/tests/test-push
@@ -72,7 +72,7 @@
 git branch -v
 
 echo % some more work on master from git
-git checkout master
+git checkout master 2>&1 | sed s/\'/\"/g
 echo delta > delta
 git add delta
 commit -m "add delta"
--- a/tests/test-tree-decomposition
+++ b/tests/test-tree-decomposition
@@ -33,11 +33,11 @@
 mkdir d1
 touch d1/f1 d1/f2
 git add d1/f1 d1/f2
-git commit -m initial
+git commit -m initial | sed -E 's/.*([0-9a-f]{7})[]:]/Commit \1/'
 
 mkdir d2
 git mv d1/f2 d2/f2
-git commit -m 'rename'
+git commit -m 'rename' | sed -E 's/.*([0-9a-f]{7})[]:]/Commit \1/'
 
 cd ..
 mkdir gitrepo2
--- a/tests/test-tree-decomposition.out
+++ b/tests/test-tree-decomposition.out
@@ -1,10 +1,10 @@
 Initialized empty Git repository in gitrepo/.git/
 
-Created initial commit 60fd61f: initial
+Commit 60fd61f initial
  0 files changed, 0 insertions(+), 0 deletions(-)
  create mode 100644 d1/f1
  create mode 100644 d1/f2
-Created commit a2e8665: rename
+Commit a2e8665 rename
  1 files changed, 0 insertions(+), 0 deletions(-)
  rename {d1 => d2}/f2 (100%)
 Initialized empty Git repository in gitrepo2/.git/