diff options
author | Vicent Martà <tanoku@gmail.com> | 2012-01-24 20:35:15 -0800 |
---|---|---|
committer | Vicent Martà <tanoku@gmail.com> | 2012-01-24 20:35:15 -0800 |
commit | 3fd1520cd4d8b4d6b6493a7d3dc393ffd9abf1db (patch) | |
tree | 51b29f5d8ffeb31ba751ab2a099e4f2a32d4be07 /tests-clar/refs | |
parent | a9fe8ae0ee1ddcc289fad53f1a671f02a3e9a88f (diff) | |
download | libgit2-3fd1520cd4d8b4d6b6493a7d3dc393ffd9abf1db.tar.gz |
Rename the Clay test suite to Clar
Clay is the name of a programming language on the makings, and we want
to avoid confusions. Sorry for the huge diff!
Diffstat (limited to 'tests-clar/refs')
-rw-r--r-- | tests-clar/refs/crashes.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests-clar/refs/crashes.c b/tests-clar/refs/crashes.c new file mode 100644 index 000000000..26ce98a68 --- /dev/null +++ b/tests-clar/refs/crashes.c @@ -0,0 +1,17 @@ +#include "clar_libgit2.h" + +void test_refs_crashes__double_free(void) +{ + git_repository *repo; + git_reference *ref, *ref2; + const char *REFNAME = "refs/heads/xxx"; + + cl_git_pass(git_repository_open(&repo, cl_fixture("testrepo.git"))); + cl_git_pass(git_reference_create_symbolic(&ref, repo, REFNAME, "refs/heads/master", 0)); + cl_git_pass(git_reference_lookup(&ref2, repo, REFNAME)); + cl_git_pass(git_reference_delete(ref)); + /* reference is gone from disk, so reloading it will fail */ + cl_must_fail(git_reference_reload(ref2)); + + git_repository_free(repo); +} |