summaryrefslogtreecommitdiff
path: root/t/t1050-large.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2020-11-07 01:12:57 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-11-07 06:05:08 (GMT)
commit53b67a801bbce7600f25823c39c7e9e7de8b72b3 (patch)
tree69ab615ea3100abc20c1baa193c0152eaa30b349 /t/t1050-large.sh
parent898f80736c75878acc02dc55672317fcc0e0a5a6 (diff)
downloadgit-53b67a801bbce7600f25823c39c7e9e7de8b72b3.zip
git-53b67a801bbce7600f25823c39c7e9e7de8b72b3.tar.gz
git-53b67a801bbce7600f25823c39c7e9e7de8b72b3.tar.bz2
tests: consolidate the `file_size` function into `test-lib-functions.sh`
In 8de7eeb54b6 (compression: unify pack.compression configuration parsing, 2016-11-15), we introduced identical copies of the `file_size` helper into three test scripts, with the plan to eventually consolidate them into a single copy. Let's do that, and adjust the function name to adhere to the `test_*` naming convention. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Reviewed-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1050-large.sh')
-rwxr-xr-xt/t1050-large.sh8
1 files changed, 1 insertions, 7 deletions
diff --git a/t/t1050-large.sh b/t/t1050-large.sh
index 61e89a8..4bab6a5 100755
--- a/t/t1050-large.sh
+++ b/t/t1050-large.sh
@@ -5,12 +5,6 @@ test_description='adding and checking out large blobs'
. ./test-lib.sh
-# This should be moved to test-lib.sh together with the
-# copy in t0021 after both topics have graduated to 'master'.
-file_size () {
- test-tool path-utils file-size "$1"
-}
-
test_expect_success setup '
# clone does not allow us to pass core.bigfilethreshold to
# new repos, so set core.bigfilethreshold globally
@@ -29,7 +23,7 @@ do
test_expect_success "add with $config" '
test_when_finished "rm -f .git/objects/pack/pack-*.* .git/index" &&
git $config add large1 &&
- sz=$(file_size .git/objects/pack/pack-*.pack) &&
+ sz=$(test_file_size .git/objects/pack/pack-*.pack) &&
case "$expect" in
small) test "$sz" -le 100000 ;;
large) test "$sz" -ge 100000 ;;