diff options
| author | Jameson Miller <jamill@microsoft.com> | 2013-02-07 14:53:52 -0500 |
|---|---|---|
| committer | Jameson Miller <jamill@microsoft.com> | 2013-02-11 11:36:28 -0500 |
| commit | db4bb4158f1005267e8d0e5785cb75487440580a (patch) | |
| tree | 202676d5c68ae1560e6f3468baeb877e041e03cb /tests-clar/network/remotes.c | |
| parent | 2e3e8c889b5fac03ca0f3b1f1303bbdabb15f1a5 (diff) | |
| download | libgit2-db4bb4158f1005267e8d0e5785cb75487440580a.tar.gz | |
Teach refspec to transform destination reference to source reference
Diffstat (limited to 'tests-clar/network/remotes.c')
| -rw-r--r-- | tests-clar/network/remotes.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tests-clar/network/remotes.c b/tests-clar/network/remotes.c index b138d8c10..51d6c946f 100644 --- a/tests-clar/network/remotes.c +++ b/tests-clar/network/remotes.c @@ -173,13 +173,20 @@ void test_network_remotes__fnmatch(void) void test_network_remotes__transform(void) { - char ref[1024]; + char ref[1024] = {0}; - memset(ref, 0x0, sizeof(ref)); cl_git_pass(git_refspec_transform(ref, sizeof(ref), _refspec, "refs/heads/master")); cl_assert_equal_s(ref, "refs/remotes/test/master"); } +void test_network_remotes__transform_destination_to_source(void) +{ + char ref[1024] = {0}; + + cl_git_pass(git_refspec_rtransform(ref, sizeof(ref), _refspec, "refs/remotes/test/master")); + cl_assert_equal_s(ref, "refs/heads/master"); +} + void test_network_remotes__transform_r(void) { git_buf buf = GIT_BUF_INIT; |
