summaryrefslogtreecommitdiff
path: root/tests/t12-repo.c
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2011-04-09 15:49:44 +0200
committerVicent Marti <tanoku@gmail.com>2011-04-09 15:25:24 -0700
commit4a34b3a9ff796f2324d59eb598595be62934acdf (patch)
tree9612e2c1ae691221c1b1eb56e32730a117412218 /tests/t12-repo.c
parentc6e65acae63bd9b251140184679ab4ea0ec5c1a9 (diff)
downloadlibgit2-4a34b3a9ff796f2324d59eb598595be62934acdf.tar.gz
Add two new accessors to the repository
git_repository_path() and git_repository_workdir() respectively return the path to the git repository and the working directory. Those paths are absolute and normalized.
Diffstat (limited to 'tests/t12-repo.c')
-rw-r--r--tests/t12-repo.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/t12-repo.c b/tests/t12-repo.c
index 876f0c5ea..70dba4255 100644
--- a/tests/t12-repo.c
+++ b/tests/t12-repo.c
@@ -194,6 +194,8 @@ BEGIN_TEST(open0, "Open a bare repository that has just been initialized by git"
must_pass(remove_placeholders(TEMP_REPO_FOLDER, "dummy-marker.txt"));
must_pass(git_repository_open(&repo, TEMP_REPO_FOLDER));
+ must_be_true(git_repository_path(repo) != NULL);
+ must_be_true(git_repository_workdir(repo) == NULL);
git_repository_free(repo);
must_pass(rmdir_recurs(TEMP_REPO_FOLDER));
@@ -211,6 +213,8 @@ BEGIN_TEST(open1, "Open a standard repository that has just been initialized by
must_pass(remove_placeholders(DEST_REPOSITORY_FOLDER, "dummy-marker.txt"));
must_pass(git_repository_open(&repo, DEST_REPOSITORY_FOLDER));
+ must_be_true(git_repository_path(repo) != NULL);
+ must_be_true(git_repository_workdir(repo) != NULL);
git_repository_free(repo);
must_pass(rmdir_recurs(TEMP_REPO_FOLDER));