diff options
Diffstat (limited to 'Tests/FindBZip2/Test/main.c')
-rw-r--r-- | Tests/FindBZip2/Test/main.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Tests/FindBZip2/Test/main.c b/Tests/FindBZip2/Test/main.c new file mode 100644 index 0000000..8e24c94 --- /dev/null +++ b/Tests/FindBZip2/Test/main.c @@ -0,0 +1,23 @@ +#include <bzlib.h> +#include <stdio.h> +#include <stdlib.h> + +int main() +{ + int chunksize = 1024; + FILE* file = fopen("test.bzip2", "wb"); + char* buf = malloc(sizeof(char) * chunksize); + int error, rsize; + unsigned int in, out; + BZFILE* bzfile = BZ2_bzWriteOpen(&error, file, 64, 1, 10); + + /* Don't actually write anything for the purposes of the test */ + + BZ2_bzWriteClose(&error, bzfile, 1, &in, &out); + free(buf); + fclose(file); + + remove("test.bzip2"); + + return 0; +} |