summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Rast <trast@student.ethz.ch>2008-08-26 21:32:34 +0200
committerEric Wong <normalperson@yhbt.net>2008-09-05 16:58:39 -0700
commit67214c85af7245a1f75da968334c529ec2610e70 (patch)
tree4ec98829e69d887a849e577de09d46fbb48c15b3
parente9a805aa2ac18621853271e33b9aef963bf4e272 (diff)
downloadgit-67214c85af7245a1f75da968334c529ec2610e70.tar.gz
git svn info: tests: use test_cmp instead of git-diff
git-diff does not appear to return the correct exit values, and gives a false success for more than half (!) of the tests due to the space in "trash directory" which git-svn fails to encode. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Acked-by: Eric Wong <normalperson@yhbt.net>
-rwxr-xr-xt/t9119-git-svn-info.sh44
1 files changed, 22 insertions, 22 deletions
diff --git a/t/t9119-git-svn-info.sh b/t/t9119-git-svn-info.sh
index a70f2b9af7..7798dcce04 100755
--- a/t/t9119-git-svn-info.sh
+++ b/t/t9119-git-svn-info.sh
@@ -60,7 +60,7 @@ test_expect_success 'setup repository and import' '
test_expect_success 'info' "
(cd svnwc; svn info) > expected.info &&
(cd gitwc; git-svn info) > actual.info &&
- git-diff expected.info actual.info
+ test_cmp expected.info actual.info
"
test_expect_success 'info --url' '
@@ -70,7 +70,7 @@ test_expect_success 'info --url' '
test_expect_success 'info .' "
(cd svnwc; svn info .) > expected.info-dot &&
(cd gitwc; git-svn info .) > actual.info-dot &&
- git-diff expected.info-dot actual.info-dot
+ test_cmp expected.info-dot actual.info-dot
"
test_expect_success 'info --url .' '
@@ -80,7 +80,7 @@ test_expect_success 'info --url .' '
test_expect_success 'info file' "
(cd svnwc; svn info file) > expected.info-file &&
(cd gitwc; git-svn info file) > actual.info-file &&
- git-diff expected.info-file actual.info-file
+ test_cmp expected.info-file actual.info-file
"
test_expect_success 'info --url file' '
@@ -90,7 +90,7 @@ test_expect_success 'info --url file' '
test_expect_success 'info directory' "
(cd svnwc; svn info directory) > expected.info-directory &&
(cd gitwc; git-svn info directory) > actual.info-directory &&
- git-diff expected.info-directory actual.info-directory
+ test_cmp expected.info-directory actual.info-directory
"
test_expect_success 'info --url directory' '
@@ -100,7 +100,7 @@ test_expect_success 'info --url directory' '
test_expect_success 'info symlink-file' "
(cd svnwc; svn info symlink-file) > expected.info-symlink-file &&
(cd gitwc; git-svn info symlink-file) > actual.info-symlink-file &&
- git-diff expected.info-symlink-file actual.info-symlink-file
+ test_cmp expected.info-symlink-file actual.info-symlink-file
"
test_expect_success 'info --url symlink-file' '
@@ -113,7 +113,7 @@ test_expect_success 'info symlink-directory' "
> expected.info-symlink-directory &&
(cd gitwc; git-svn info symlink-directory) \
> actual.info-symlink-directory &&
- git-diff expected.info-symlink-directory actual.info-symlink-directory
+ test_cmp expected.info-symlink-directory actual.info-symlink-directory
"
test_expect_success 'info --url symlink-directory' '
@@ -133,7 +133,7 @@ test_expect_success 'info added-file' "
cd .. &&
(cd svnwc; svn info added-file) > expected.info-added-file &&
(cd gitwc; git-svn info added-file) > actual.info-added-file &&
- git-diff expected.info-added-file actual.info-added-file
+ test_cmp expected.info-added-file actual.info-added-file
"
test_expect_success 'info --url added-file' '
@@ -155,7 +155,7 @@ test_expect_success 'info added-directory' "
> expected.info-added-directory &&
(cd gitwc; git-svn info added-directory) \
> actual.info-added-directory &&
- git-diff expected.info-added-directory actual.info-added-directory
+ test_cmp expected.info-added-directory actual.info-added-directory
"
test_expect_success 'info --url added-directory' '
@@ -177,7 +177,7 @@ test_expect_success 'info added-symlink-file' "
> expected.info-added-symlink-file &&
(cd gitwc; git-svn info added-symlink-file) \
> actual.info-added-symlink-file &&
- git-diff expected.info-added-symlink-file \
+ test_cmp expected.info-added-symlink-file \
actual.info-added-symlink-file
"
@@ -200,7 +200,7 @@ test_expect_success 'info added-symlink-directory' "
> expected.info-added-symlink-directory &&
(cd gitwc; git-svn info added-symlink-directory) \
> actual.info-added-symlink-directory &&
- git-diff expected.info-added-symlink-directory \
+ test_cmp expected.info-added-symlink-directory \
actual.info-added-symlink-directory
"
@@ -227,7 +227,7 @@ test_expect_success 'info deleted-file' "
(cd gitwc; git-svn info file) |
sed -e 's/^\(Text Last Updated:\).*/\1 TEXT-LAST-UPDATED-STRING/' \
> actual.info-deleted-file &&
- git-diff expected.info-deleted-file actual.info-deleted-file
+ test_cmp expected.info-deleted-file actual.info-deleted-file
"
test_expect_success 'info --url file (deleted)' '
@@ -248,7 +248,7 @@ test_expect_success 'info deleted-directory' "
(cd gitwc; git-svn info directory) |
sed -e 's/^\(Text Last Updated:\).*/\1 TEXT-LAST-UPDATED-STRING/' \
> actual.info-deleted-directory &&
- git-diff expected.info-deleted-directory actual.info-deleted-directory
+ test_cmp expected.info-deleted-directory actual.info-deleted-directory
"
test_expect_success 'info --url directory (deleted)' '
@@ -269,7 +269,7 @@ test_expect_success 'info deleted-symlink-file' "
(cd gitwc; git-svn info symlink-file) |
sed -e 's/^\(Text Last Updated:\).*/\1 TEXT-LAST-UPDATED-STRING/' \
> actual.info-deleted-symlink-file &&
- git-diff expected.info-deleted-symlink-file \
+ test_cmp expected.info-deleted-symlink-file \
actual.info-deleted-symlink-file
"
@@ -291,7 +291,7 @@ test_expect_success 'info deleted-symlink-directory' "
(cd gitwc; git-svn info symlink-directory) |
sed -e 's/^\(Text Last Updated:\).*/\1 TEXT-LAST-UPDATED-STRING/' \
> actual.info-deleted-symlink-directory &&
- git-diff expected.info-deleted-symlink-directory \
+ test_cmp expected.info-deleted-symlink-directory \
actual.info-deleted-symlink-directory
"
@@ -309,13 +309,13 @@ test_expect_success 'info unknown-file' "
ptouch gitwc/unknown-file svnwc/unknown-file &&
(cd svnwc; svn info unknown-file) 2> expected.info-unknown-file &&
(cd gitwc; git-svn info unknown-file) 2> actual.info-unknown-file &&
- git-diff expected.info-unknown-file actual.info-unknown-file
+ test_cmp expected.info-unknown-file actual.info-unknown-file
"
test_expect_success 'info --url unknown-file' '
test -z "$(cd gitwc; git-svn info --url unknown-file \
2> ../actual.info--url-unknown-file)" &&
- git-diff expected.info-unknown-file actual.info--url-unknown-file
+ test_cmp expected.info-unknown-file actual.info--url-unknown-file
'
test_expect_success 'info unknown-directory' "
@@ -326,13 +326,13 @@ test_expect_success 'info unknown-directory' "
2> expected.info-unknown-directory &&
(cd gitwc; git-svn info unknown-directory) \
2> actual.info-unknown-directory &&
- git-diff expected.info-unknown-directory actual.info-unknown-directory
+ test_cmp expected.info-unknown-directory actual.info-unknown-directory
"
test_expect_success 'info --url unknown-directory' '
test -z "$(cd gitwc; git-svn info --url unknown-directory \
2> ../actual.info--url-unknown-directory)" &&
- git-diff expected.info-unknown-directory \
+ test_cmp expected.info-unknown-directory \
actual.info--url-unknown-directory
'
@@ -348,14 +348,14 @@ test_expect_success 'info unknown-symlink-file' "
2> expected.info-unknown-symlink-file &&
(cd gitwc; git-svn info unknown-symlink-file) \
2> actual.info-unknown-symlink-file &&
- git-diff expected.info-unknown-symlink-file \
+ test_cmp expected.info-unknown-symlink-file \
actual.info-unknown-symlink-file
"
test_expect_success 'info --url unknown-symlink-file' '
test -z "$(cd gitwc; git-svn info --url unknown-symlink-file \
2> ../actual.info--url-unknown-symlink-file)" &&
- git-diff expected.info-unknown-symlink-file \
+ test_cmp expected.info-unknown-symlink-file \
actual.info--url-unknown-symlink-file
'
@@ -372,14 +372,14 @@ test_expect_success 'info unknown-symlink-directory' "
2> expected.info-unknown-symlink-directory &&
(cd gitwc; git-svn info unknown-symlink-directory) \
2> actual.info-unknown-symlink-directory &&
- git-diff expected.info-unknown-symlink-directory \
+ test_cmp expected.info-unknown-symlink-directory \
actual.info-unknown-symlink-directory
"
test_expect_success 'info --url unknown-symlink-directory' '
test -z "$(cd gitwc; git-svn info --url unknown-symlink-directory \
2> ../actual.info--url-unknown-symlink-directory)" &&
- git-diff expected.info-unknown-symlink-directory \
+ test_cmp expected.info-unknown-symlink-directory \
actual.info--url-unknown-symlink-directory
'