diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/index/splitindex.c | 21 | ||||
-rw-r--r-- | tests/resources/splitindex/.gitted/HEAD | 1 | ||||
-rw-r--r-- | tests/resources/splitindex/.gitted/config | 8 | ||||
-rw-r--r-- | tests/resources/splitindex/.gitted/index | bin | 0 -> 100 bytes | |||
-rw-r--r-- | tests/resources/splitindex/.gitted/info/exclude | 6 | ||||
-rw-r--r-- | tests/resources/splitindex/.gitted/objects/.gitkeep | 0 | ||||
-rw-r--r-- | tests/resources/splitindex/.gitted/refs/.gitkeep | 0 | ||||
-rw-r--r-- | tests/resources/splitindex/.gitted/sharedindex.39d890139ee5356c7ef572216cebcd27aa41f9df | bin | 0 -> 32 bytes |
8 files changed, 36 insertions, 0 deletions
diff --git a/tests/index/splitindex.c b/tests/index/splitindex.c new file mode 100644 index 000000000..d32ed1022 --- /dev/null +++ b/tests/index/splitindex.c @@ -0,0 +1,21 @@ +#include "clar_libgit2.h" +#include "index.h" + +static git_repository *g_repo; + +void test_index_splitindex__initialize(void) +{ + g_repo = cl_git_sandbox_init("splitindex"); +} + +void test_index_splitindex__cleanup(void) +{ + cl_git_sandbox_cleanup(); +} + +void test_index_splitindex__fail_on_open(void) +{ + git_index *idx; + cl_git_fail_with(-1, git_repository_index(&idx, g_repo)); + cl_assert_equal_s(git_error_last()->message, "unsupported mandatory extension: 'link'"); +} diff --git a/tests/resources/splitindex/.gitted/HEAD b/tests/resources/splitindex/.gitted/HEAD new file mode 100644 index 000000000..cb089cd89 --- /dev/null +++ b/tests/resources/splitindex/.gitted/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/tests/resources/splitindex/.gitted/config b/tests/resources/splitindex/.gitted/config new file mode 100644 index 000000000..e9d0b6d3b --- /dev/null +++ b/tests/resources/splitindex/.gitted/config @@ -0,0 +1,8 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = false + logallrefupdates = true + ignorecase = true + precomposeunicode = true + splitIndex = true diff --git a/tests/resources/splitindex/.gitted/index b/tests/resources/splitindex/.gitted/index Binary files differnew file mode 100644 index 000000000..ff3448847 --- /dev/null +++ b/tests/resources/splitindex/.gitted/index diff --git a/tests/resources/splitindex/.gitted/info/exclude b/tests/resources/splitindex/.gitted/info/exclude new file mode 100644 index 000000000..a5196d1be --- /dev/null +++ b/tests/resources/splitindex/.gitted/info/exclude @@ -0,0 +1,6 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ diff --git a/tests/resources/splitindex/.gitted/objects/.gitkeep b/tests/resources/splitindex/.gitted/objects/.gitkeep new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/resources/splitindex/.gitted/objects/.gitkeep diff --git a/tests/resources/splitindex/.gitted/refs/.gitkeep b/tests/resources/splitindex/.gitted/refs/.gitkeep new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/resources/splitindex/.gitted/refs/.gitkeep diff --git a/tests/resources/splitindex/.gitted/sharedindex.39d890139ee5356c7ef572216cebcd27aa41f9df b/tests/resources/splitindex/.gitted/sharedindex.39d890139ee5356c7ef572216cebcd27aa41f9df Binary files differnew file mode 100644 index 000000000..3330d716f --- /dev/null +++ b/tests/resources/splitindex/.gitted/sharedindex.39d890139ee5356c7ef572216cebcd27aa41f9df |