diff options
Diffstat (limited to 'tests/t0000-errno.c')
| -rw-r--r-- | tests/t0000-errno.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/t0000-errno.c b/tests/t0000-errno.c new file mode 100644 index 000000000..dba81bc59 --- /dev/null +++ b/tests/t0000-errno.c @@ -0,0 +1,14 @@ +#include "test_lib.h" +#include "errors.h" +#include <string.h> + +BEGIN_TEST(errno_zero_on_init) + must_be_true(git_errno == 0); +END_TEST + +BEGIN_TEST(set_ENOTOID) + must_be_true(GIT_ENOTOID != 0); + git_errno = GIT_ENOTOID; + must_be_true(git_errno == GIT_ENOTOID); + must_pass(strcmp(git_strerror(git_errno), "Not a git oid")); +END_TEST |
