aboutsummaryrefslogtreecommitdiff
path: root/tests/test_errors.c
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2021-05-05 19:57:39 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2021-05-05 19:57:39 -0400
commita92b4038179c3706bd176097be1caabd88824755 (patch)
tree3ca109b34e24e5940e2d12acca39091c83963fd3 /tests/test_errors.c
parentea6e2613aca23c84373e686d739498969062f79e (diff)
downloadcleanpath-a92b4038179c3706bd176097be1caabd88824755.tar.gz
Add tests
Diffstat (limited to 'tests/test_errors.c')
-rw-r--r--tests/test_errors.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_errors.c b/tests/test_errors.c
new file mode 100644
index 0000000..f9d641f
--- /dev/null
+++ b/tests/test_errors.c
@@ -0,0 +1,11 @@
+#include "cleanpath.h"
+#include "framework.h"
+
+int main() {
+ struct CleanPath *path;
+ path = NULL;
+
+ //intentionally bad
+ myassert(cleanpath_init("good", NULL) == NULL, "cleanpath_init() returned non-NULL on NULL sep\n");
+ myassert(cleanpath_init(NULL, "good") == NULL, "cleanpath_init() returned non-NULL on NULL path\n");
+} \ No newline at end of file