Jeff Hostetler wrote:
I'm looking at t5616 now on my mac.
Looks like the MAC doesn't like my line counting in the tests.
I'll fix in my next version.

Perhaps that's as simple as using the test_line_counts helper?

diff --git i/t/t5616-partial-clone.sh w/t/t5616-partial-clone.sh
index fa573f8cdb..6d673de90c 100755
--- i/t/t5616-partial-clone.sh
+++ w/t/t5616-partial-clone.sh
@@ -19,7 +19,7 @@ test_expect_success 'setup normal src repo' '
                git -C src ls-files -s file.$n.txt >>temp
        done &&
        awk -f print_2.awk <temp | sort >expect_1.oids &&
-       test "$(wc -l <expect_1.oids)" = "4"
+       test_line_count = 4 expect_1.oids
'

# bare clone "src" giving "srv.bare" for use as our server.
@@ -76,7 +76,7 @@ test_expect_success 'push new commits to server' '
        grep blob <temp \
                | awk -f print_1.awk \
                | sort >expect_2.oids &&
-       test "$(wc -l <expect_2.oids)" = "8" &&
+       test_line_count = 8 expect_2.oids &&
        git -C src blame master -- file.1.txt >expect.blame
'

@@ -100,7 +100,7 @@ test_expect_success 'partial fetch inherits filter 
settings' '
# it should be in a new packfile (since the promisor boundary is
# currently a packfile, it should not get unpacked upon receipt.)
test_expect_success 'verify diff causes dynamic object fetch' '
-       test "$(wc -l <observed.oids)" = "4" &&
+       test_line_count = 4 observed.oids &&
                cat observed.oids &&
        git -C pc1 diff master..origin/master -- file.1.txt &&
        (       cd pc1/.git/objects/pack;
@@ -110,7 +110,7 @@ test_expect_success 'verify diff causes dynamic object 
fetch' '
                | awk -f print_1.awk \
                | sort >observed.oids &&
                cat observed.oids &&
-       test "$(wc -l <observed.oids)" = "4"
+       test_line_count = 4 observed.oids
'

# force dynamic object fetch using blame.

--
Todd
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If quizzes are quizzical, what are tests?

Reply via email to