diff options
author | Ben Straub <bs@github.com> | 2013-11-15 02:05:52 +0400 |
---|---|---|
committer | Ben Straub <bs@github.com> | 2013-11-15 02:05:52 +0400 |
commit | 1782038144ef3413831801bb9c2f3038a84ac6f4 (patch) | |
tree | f074cc30890a20f5418c10fae1815ca516588a27 /tests/config/backend.c | |
parent | 7b947bf5cc59eefa83c28eb5f5fd8434207ebb8b (diff) |
Rename tests-clar to tests
Diffstat (limited to 'tests/config/backend.c')
-rw-r--r-- | tests/config/backend.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/config/backend.c b/tests/config/backend.c new file mode 100644 index 000000000..3fd6eb114 --- /dev/null +++ b/tests/config/backend.c @@ -0,0 +1,24 @@ +#include "clar_libgit2.h" +#include "git2/sys/config.h" + +void test_config_backend__checks_version(void) +{ + git_config *cfg; + git_config_backend backend = GIT_CONFIG_BACKEND_INIT; + const git_error *err; + + backend.version = 1024; + + cl_git_pass(git_config_new(&cfg)); + cl_git_fail(git_config_add_backend(cfg, &backend, 0, false)); + err = giterr_last(); + cl_assert_equal_i(GITERR_INVALID, err->klass); + + giterr_clear(); + backend.version = 1024; + cl_git_fail(git_config_add_backend(cfg, &backend, 0, false)); + err = giterr_last(); + cl_assert_equal_i(GITERR_INVALID, err->klass); + + git_config_free(cfg); +} |