From bd9f4fd24cd9f011dc5105d6f24ea90dfdf4f1b3 Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Wed, 11 Nov 2015 10:54:08 +0100 Subject: [PATCH] tests: add worktree test data --- tests/iterator/workdir.c | 3 ++- tests/refs/list.c | 4 ++-- tests/resources/testrepo-worktree/.gitted | Bin 0 -> 53 bytes tests/resources/testrepo-worktree/README | Bin 0 -> 10 bytes tests/resources/testrepo-worktree/branch_file.txt | Bin 0 -> 8 bytes tests/resources/testrepo-worktree/link_to_new.txt | 1 + tests/resources/testrepo-worktree/new.txt | Bin 0 -> 12 bytes .../.gitted/logs/refs/heads/testrepo-worktree | Bin 0 -> 156 bytes .../testrepo/.gitted/refs/heads/testrepo-worktree | Bin 0 -> 41 bytes .../.gitted/worktrees/testrepo-worktree/HEAD | Bin 0 -> 34 bytes .../.gitted/worktrees/testrepo-worktree/commondir | Bin 0 -> 6 bytes .../.gitted/worktrees/testrepo-worktree/gitdir | Bin 0 -> 35 bytes .../.gitted/worktrees/testrepo-worktree/index | Bin 0 -> 369 bytes .../.gitted/worktrees/testrepo-worktree/logs/HEAD | Bin 0 -> 214 bytes 14 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 tests/resources/testrepo-worktree/.gitted create mode 100644 tests/resources/testrepo-worktree/README create mode 100644 tests/resources/testrepo-worktree/branch_file.txt create mode 120000 tests/resources/testrepo-worktree/link_to_new.txt create mode 100644 tests/resources/testrepo-worktree/new.txt create mode 100644 tests/resources/testrepo/.gitted/logs/refs/heads/testrepo-worktree create mode 100644 tests/resources/testrepo/.gitted/refs/heads/testrepo-worktree create mode 100644 tests/resources/testrepo/.gitted/worktrees/testrepo-worktree/HEAD create mode 100644 tests/resources/testrepo/.gitted/worktrees/testrepo-worktree/commondir create mode 100644 tests/resources/testrepo/.gitted/worktrees/testrepo-worktree/gitdir create mode 100644 tests/resources/testrepo/.gitted/worktrees/testrepo-worktree/index create mode 100644 tests/resources/testrepo/.gitted/worktrees/testrepo-worktree/logs/HEAD diff --git a/tests/iterator/workdir.c b/tests/iterator/workdir.c index 28fcc0d23..165cca5ed 100644 --- a/tests/iterator/workdir.c +++ b/tests/iterator/workdir.c @@ -616,6 +616,7 @@ void test_iterator_workdir__filesystem2(void) "heads/packed-test", "heads/subtrees", "heads/test", + "heads/testrepo-worktree", "tags/e90810b", "tags/foo/bar", "tags/foo/foo/bar", @@ -628,7 +629,7 @@ void test_iterator_workdir__filesystem2(void) cl_git_pass(git_iterator_for_filesystem( &i, "testrepo/.git/refs", NULL)); - expect_iterator_items(i, 13, expect_base, 13, expect_base); + expect_iterator_items(i, 14, expect_base, 14, expect_base); git_iterator_free(i); } diff --git a/tests/refs/list.c b/tests/refs/list.c index 374943b05..b4101ba7a 100644 --- a/tests/refs/list.c +++ b/tests/refs/list.c @@ -36,7 +36,7 @@ void test_refs_list__all(void) /* We have exactly 12 refs in total if we include the packed ones: * there is a reference that exists both in the packfile and as * loose, but we only list it once */ - cl_assert_equal_i((int)ref_list.count, 15); + cl_assert_equal_i((int)ref_list.count, 16); git_strarray_free(&ref_list); } @@ -51,7 +51,7 @@ void test_refs_list__do_not_retrieve_references_which_name_end_with_a_lock_exten "144344043ba4d4a405da03de3844aa829ae8be0e\n"); cl_git_pass(git_reference_list(&ref_list, g_repo)); - cl_assert_equal_i((int)ref_list.count, 15); + cl_assert_equal_i((int)ref_list.count, 16); git_strarray_free(&ref_list); } diff --git a/tests/resources/testrepo-worktree/.gitted b/tests/resources/testrepo-worktree/.gitted new file mode 100644 index 0000000000000000000000000000000000000000..fe4556a92e68ed14b7ac05eb465bcee87ec11fba GIT binary patch literal 53 tcmYe#EJ?{MvQp5~(=SOaE-6Ya$k*3P&n(d|&o9aba#M@p;<_*)E&vVs6XXB@ literal 0 HcmV?d00001 diff --git a/tests/resources/testrepo-worktree/README b/tests/resources/testrepo-worktree/README new file mode 100644 index 0000000000000000000000000000000000000000..a8233120f6ad708f843d861ce2b7228ec4e3dec6 GIT binary patch literal 10 Rcmc~utyCzU`w|QI)3=4p=aCfmE2l$6nVkJOLh~Jb!kqpa?qy&{m=hA@3i7Wc zgNcFxm+Rfu{JXxLJ6aAq?BZi754yRb^;+YPi$SX%OHa&gs*EdjW2#W%@F@iV+^&ba literal 0 HcmV?d00001 diff --git a/tests/resources/testrepo/.gitted/worktrees/testrepo-worktree/logs/HEAD b/tests/resources/testrepo/.gitted/worktrees/testrepo-worktree/logs/HEAD new file mode 100644 index 0000000000000000000000000000000000000000..3bede502ee05ea8314e9e0244b9f43d1f4c6eda8 GIT binary patch literal 214 zcma*g%?$z}5J2IxRxx*@8Tk`7##n-h6(9~SAuI$&ZC^{++dF*8L+7G@_#nL_@1)kw zYGH#oMQaR6h1LZ@F#@iIH_ttV40ooq%)UPv&TU*<9*0yea8ybttCW$jLxH#nGlg8= cJVB|Sw7ekpTGsEl0@L75t?s|I=YP@m2NSJ8JOBUy literal 0 HcmV?d00001