Commit 2df37f42c15ac74cb27bbd38e0f896159acd4d19

nulltoken 2012-10-18T23:59:22

refs: cover more refname validity edge cases

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/tests-clar/refs/isvalidname.c b/tests-clar/refs/isvalidname.c
index 8a31f5c..3cc838d 100644
--- a/tests-clar/refs/isvalidname.c
+++ b/tests-clar/refs/isvalidname.c
@@ -21,4 +21,7 @@ void test_refs_isvalidname__wont_hopefully_choke_on_valid_formats(void)
 	cl_assert_equal_i(true, git_reference_is_valid_name("ONE_LEVEL"));
 	cl_assert_equal_i(true, git_reference_is_valid_name("refs/stash"));
 	cl_assert_equal_i(true, git_reference_is_valid_name("refs/remotes/origin/bim_with_3d@11296"));
+	cl_assert_equal_i(true, git_reference_is_valid_name("refs/master{yesterday"));
+	cl_assert_equal_i(true, git_reference_is_valid_name("refs/master}yesterday"));
+	cl_assert_equal_i(true, git_reference_is_valid_name("refs/master{yesterday}"));
 }