aboutsummaryrefslogtreecommitdiff
path: root/tests/test_errors.c
blob: 18c444ed403c716e94697347a8fe508388d8e121 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include "cleanpath/cleanpath.h"
#include "framework.h"

int main() {
    struct CleanPath *path;
    path = NULL;

    //intentionally bad
    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);
}