@matheusbsbs / matheus-bagliano / commits / 1c6669351a
Fork 0

Fix t7601-merge-pull-config.sh on AIX

The test failed on AIX (and likely other OS, such as apparently OSX) where wc -l outputs whitespace. Also, avoid unnecessary eval in conflict_count(). Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Miklos Vajna committed Jul 5, 2008 at 16:23 UTC 1c6669351a47c834cceb75d6044a1aae259fc69f
1 file changed +7 -7
t/t7601-merge-pull-config.sh
+7 -7
@@ -70,10 +70,10 @@ test_expect_success 'merge c1 with c2 and c3 (recursive and octopus in pull.octo
70
71 conflict_count()
72 {
73 - eval $1=`{
73 + {
74 git diff-files --name-only
75 git ls-files --unmerged
76 - } | wc -l`
76 + } | wc -l
77 }
78
79 # c4 - c5
@@ -115,15 +115,15 @@ test_expect_success 'merge picks up the best result' '
115 git config pull.twohead "recursive resolve" &&
116 git reset --hard c5 &&
117 git merge -s resolve c6
118 - conflict_count resolve_count &&
118 + resolve_count=$(conflict_count) &&
119 git reset --hard c5 &&
120 git merge -s recursive c6
121 - conflict_count recursive_count &&
121 + recursive_count=$(conflict_count) &&
122 git reset --hard c5 &&
123 git merge c6
124 - conflict_count auto_count &&
125 - test "$auto_count" = "$recursive_count" &&
126 - test "$auto_count" != "$resolve_count"
124 + auto_count=$(conflict_count) &&
125 + test $auto_count = $recursive_count &&
126 + test $auto_count != $resolve_count
127 '
128
129 test_done