summaryrefslogtreecommitdiff
path: root/tests-clar/checkout/tree.c
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2013-03-25 14:13:53 -0700
committerRussell Belfer <rb@github.com>2013-03-25 14:13:53 -0700
commit050ab9950d089c55e874b63e5ab9c8d0b948cf46 (patch)
treedadc0aecd4194c24fb00d7eda125561b277fe3a4 /tests-clar/checkout/tree.c
parent4a15ea869ca097dca0b45b1202429cc12cb94219 (diff)
downloadlibgit2-050ab9950d089c55e874b63e5ab9c8d0b948cf46.tar.gz
Fix up checkout file contents checks
This fixes of the file contents checks in checkout to give slightly better error messages by directly calling the underlying clar assertions so the file and line number of the top level call can be reported correctly, and renames the helpers to not start with "test_" since that is kind of reserved by clar. This also enables some of the CRLF tests on all platforms that were previously Windows only (by pushing a check of the native line endings into the test body).
Diffstat (limited to 'tests-clar/checkout/tree.c')
-rw-r--r--tests-clar/checkout/tree.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests-clar/checkout/tree.c b/tests-clar/checkout/tree.c
index 2a8fbc457..5a2eacea1 100644
--- a/tests-clar/checkout/tree.c
+++ b/tests-clar/checkout/tree.c
@@ -248,7 +248,7 @@ void test_checkout_tree__can_update_only(void)
cl_assert(!git_path_isdir("testrepo/a"));
- test_file_contents_nocr("testrepo/branch_file.txt", "hi\nbye!\n");
+ check_file_contents_nocr("testrepo/branch_file.txt", "hi\nbye!\n");
/* now checkout branch but with update only */
@@ -269,7 +269,7 @@ void test_checkout_tree__can_update_only(void)
cl_assert(!git_path_isdir("testrepo/a"));
/* but this file still should have been updated */
- test_file_contents_nocr("testrepo/branch_file.txt", "hi\n");
+ check_file_contents_nocr("testrepo/branch_file.txt", "hi\n");
git_object_free(obj);
}
@@ -500,7 +500,7 @@ void test_checkout_tree__issue_1397(void)
cl_git_pass(git_checkout_tree(g_repo, tree, &opts));
- test_file_contents("./issue_1397/crlf_file.txt", "first line\r\nsecond line\r\nboth with crlf");
+ check_file_contents("./issue_1397/crlf_file.txt", "first line\r\nsecond line\r\nboth with crlf");
git_object_free(tree);
}