aboutsummaryrefslogtreecommitdiffstats
path: root/t/test-lib-functions.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2020-11-07 01:12:57 +0000
committerJunio C Hamano <gitster@pobox.com>2020-11-06 22:05:08 -0800
commit53b67a801bbce7600f25823c39c7e9e7de8b72b3 (patch)
tree69ab615ea3100abc20c1baa193c0152eaa30b349 /t/test-lib-functions.sh
parentGit 2.29.2 (diff)
downloadgit-53b67a801bbce7600f25823c39c7e9e7de8b72b3.tar.gz
git-53b67a801bbce7600f25823c39c7e9e7de8b72b3.zip
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/test-lib-functions.sh')
-rw-r--r--t/test-lib-functions.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh
index 8d59b90348..84822848d4 100644
--- a/t/test-lib-functions.sh
+++ b/t/test-lib-functions.sh
@@ -783,6 +783,10 @@ test_line_count () {
fi
}
+test_file_size () {
+ test-tool path-utils file-size "$1"
+}
+
# Returns success if a comma separated string of keywords ($1) contains a
# given keyword ($2).
# Examples: