diff options
author | Edward Thomson <ethomson@github.com> | 2016-04-11 13:29:54 -0400 |
---|---|---|
committer | Edward Thomson <ethomson@github.com> | 2016-04-11 13:29:54 -0400 |
commit | 0e00eecf83d8811e08024da3becf5159bc9d6226 (patch) | |
tree | e946ee3798c666ccabe3d3c44571d26fc5c19b44 /tests/refs | |
parent | b93b74b9e30866492205e379b5da32cbcd399680 (diff) | |
parent | 77965c685d0ca8d5dc65ba3aedb41cca5485ae04 (diff) | |
download | libgit2-0e00eecf83d8811e08024da3becf5159bc9d6226.tar.gz |
Merge pull request #3736 from libgit2/cmn/dwim-general-message
refs: provide a more general error message for dwim
Diffstat (limited to 'tests/refs')
-rw-r--r-- | tests/refs/lookup.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/refs/lookup.c b/tests/refs/lookup.c index d076e491f..456d0d2a8 100644 --- a/tests/refs/lookup.c +++ b/tests/refs/lookup.c @@ -58,3 +58,11 @@ void test_refs_lookup__namespace(void) error = git_reference_lookup(&ref, g_repo, "refs/heads/"); cl_assert_equal_i(error, GIT_EINVALIDSPEC); } + +void test_refs_lookup__dwim_notfound(void) +{ + git_reference *ref; + + cl_git_fail_with(GIT_ENOTFOUND, git_reference_dwim(&ref, g_repo, "idontexist")); + cl_assert_equal_s("no reference found for shorthand 'idontexist'", giterr_last()->message); +} |