diff options
author | Joseph Hunkeler <jhunkeler@users.noreply.github.com> | 2021-05-16 21:06:48 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-16 21:06:48 -0400 |
commit | bc3013fc68746265db78bf92623f7e6e3e469264 (patch) | |
tree | fadf9d7fb0febde598dbc4a7b5ec27eea62020cc /tests/test_errors.c | |
parent | 25493db89f8e23d2e78e1ee16b3748173ef60188 (diff) | |
download | cleanpath-bc3013fc68746265db78bf92623f7e6e3e469264.tar.gz |
Add default path (#6)
* Add default path
* Improve support/implementation logic
* Fix braces in tests
* Enable warnings
* Emit more generalized form of windows path
* Change initialization order
* Add --default/-D to documentation
* Fix platform detection
Diffstat (limited to 'tests/test_errors.c')
-rw-r--r-- | tests/test_errors.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/test_errors.c b/tests/test_errors.c index 82241ed..18c444e 100644 --- a/tests/test_errors.c +++ b/tests/test_errors.c @@ -6,6 +6,8 @@ int main() { 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"); + myassert((path = cleanpath_init("good", NULL)) == NULL, "cleanpath_init() returned non-NULL on NULL sep\n"); + if (path) cleanpath_free(path); + myassert((path = cleanpath_init(NULL, "good")) == NULL, "cleanpath_init() returned non-NULL on NULL path\n"); + if (path) cleanpath_free(path); } |