Got source compiling.
This commit is contained in:
21
test/test_source.c
Normal file
21
test/test_source.c
Normal file
@@ -0,0 +1,21 @@
|
||||
#include "../src/journal.h"
|
||||
#include "../src/source.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
|
||||
int main(void) {
|
||||
int success = EXIT_SUCCESS;
|
||||
errno = 0;
|
||||
struct journal j = journal();
|
||||
struct sources s = sources(&j);
|
||||
if(errno) goto catch;
|
||||
printf("***success\n");
|
||||
goto finally;
|
||||
catch:
|
||||
success = EXIT_FAILURE, perror("source");
|
||||
finally:
|
||||
sources_(&s);
|
||||
journal_(&j);
|
||||
return success;
|
||||
}
|
||||
Reference in New Issue
Block a user