Skip to content
Browse files

tests: update for newer git output format

  • Loading branch information...
1 parent 544b488 commit 686b67b0f34de22183340fccad25b6db9dd7a966 @durin42 durin42 committed Mar 31, 2012
Showing with 9 additions and 9 deletions.
  1. +3 −3 tests/test-git-submodules
  2. +2 −2 tests/test-git-submodules.out
  3. +2 −2 tests/test-merge
  4. +1 −1 tests/test-merge.out
  5. +1 −1 tests/test-octopus
View
6 tests/test-git-submodules
@@ -26,7 +26,7 @@ commit()
{
GIT_AUTHOR_DATE="2007-01-01 00:00:$count +0000"
GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"
- git commit "$@" >/dev/null 2>/dev/null || echo "git commit error"
+ git commit "$@" >/dev/null 2>/dev/null || echo "git commit error" | sed 's/, 0 deletions(-)//'
count=`expr $count + 1`
}
@@ -58,10 +58,10 @@ clonefilt='s/Cloning into/Initialized empty Git repository in/;s/in .*/in .../'
git clone ../gitrepo1 . | python -c "$rmpwd" | sed "$clonefilt" | egrep -v '^done\.$'
git submodule add ../gitsubrepo subrepo | python -c "$rmpwd" | sed "$clonefilt" | egrep -v '^done\.$'
-git commit -m 'add subrepo'
+git commit -m 'add subrepo' | sed 's/, 0 deletions(-)//'
git rm --cached subrepo
git rm .gitmodules
-git commit -m 'rm subrepo'
+git commit -m 'rm subrepo' | sed 's/, 0 deletions(-)//' | sed 's/, 0 insertions(+)//'
cd ..
hg clone gitrepo2 hgrepo | grep -v '^updating'
View
4 tests/test-git-submodules.out
@@ -7,13 +7,13 @@ Initialized empty Git repository in ...
Initialized empty Git repository in ...
[master e42b08b] add subrepo
- 2 files changed, 4 insertions(+), 0 deletions(-)
+ 2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 subrepo
rm 'subrepo'
rm '.gitmodules'
[master 7e4c934] rm subrepo
- 2 files changed, 0 insertions(+), 4 deletions(-)
+ 2 files changed, 4 deletions(-)
delete mode 100644 .gitmodules
delete mode 160000 subrepo
importing git objects into hg
View
4 tests/test-merge
@@ -26,7 +26,7 @@ commit()
{
GIT_AUTHOR_DATE="2007-01-01 00:00:$count +0000"
GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"
- git commit "$@" >/dev/null 2>/dev/null || echo "git commit error"
+ git commit "$@" >/dev/null 2>/dev/null || echo "git commit error" | sed 's/, 0 deletions(-)//'
count=`expr $count + 1`
}
@@ -48,7 +48,7 @@ git add gamma
commit -m 'add gamma'
# clean merge
-git merge beta | sed "s/the '//;s/' strategy//" | sed 's/^Merge.*recursive.*$/Merge successful/'
+git merge beta | sed "s/the '//;s/' strategy//" | sed 's/^Merge.*recursive.*$/Merge successful/' | sed 's/files/file/;s/insertions/insertion/'
cd ..
mkdir gitrepo2
View
2 tests/test-merge.out
@@ -4,7 +4,7 @@ Switched to a new branch "beta"
Switched to branch "master"
Merge successful
beta | 1 +
- 1 files changed, 1 insertions(+), 0 deletions(-)
+ 1 file changed, 1 insertion(+), 0 deletions(-)
create mode 100644 beta
Initialized empty Git repository in gitrepo2/
View
2 tests/test-octopus
@@ -26,7 +26,7 @@ commit()
{
GIT_AUTHOR_DATE="2007-01-01 00:00:$count +0000"
GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"
- git commit "$@" >/dev/null 2>/dev/null || echo "git commit error"
+ git commit "$@" >/dev/null 2>/dev/null || echo "git commit error" | sed 's/0 deletions(-)//'
count=`expr $count + 1`
}

0 comments on commit 686b67b

Please sign in to comment.
Something went wrong with that request. Please try again.