summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2020-06-02 12:21:22 +0100
committerGitHub <noreply@github.com>2020-06-02 12:21:22 +0100
commit6de8aa7f3144efe10d706bca513c8add24e8f407 (patch)
treec2da50a184f81796dcfe3ac02e08030834116aa9 /tests
parent22f9a0fc859a2e65f16dcda9ca5826b1f0c3216c (diff)
parent5278a0061100e2527e83f4cb159b40fc58bc786c (diff)
downloadlibgit2-6de8aa7f3144efe10d706bca513c8add24e8f407.tar.gz
Merge pull request #5532 from joshtriplett/pack-default-path
git_packbuilder_write: Allow setting path to NULL to use the default path
Diffstat (limited to 'tests')
-rw-r--r--tests/pack/packbuilder.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/pack/packbuilder.c b/tests/pack/packbuilder.c
index 32f061232..5f5441a5d 100644
--- a/tests/pack/packbuilder.c
+++ b/tests/pack/packbuilder.c
@@ -151,6 +151,15 @@ void test_pack_packbuilder__get_hash(void)
cl_assert_equal_s(hex, "7f5fa362c664d68ba7221259be1cbd187434b2f0");
}
+void test_pack_packbuilder__write_default_path(void)
+{
+ seed_packbuilder();
+
+ cl_git_pass(git_packbuilder_write(_packbuilder, NULL, 0, NULL, NULL));
+ cl_assert(git_path_exists("objects/pack/pack-7f5fa362c664d68ba7221259be1cbd187434b2f0.idx"));
+ cl_assert(git_path_exists("objects/pack/pack-7f5fa362c664d68ba7221259be1cbd187434b2f0.pack"));
+}
+
static void test_write_pack_permission(mode_t given, mode_t expected)
{
struct stat statbuf;