summaryrefslogtreecommitdiff
path: root/test-it.c
diff options
context:
space:
mode:
authorpixel <pixel>2007-07-06 16:22:05 +0000
committerpixel <pixel>2007-07-06 16:22:05 +0000
commit9e61ac4e3d435a530cdff0170975f7759c50b02d (patch)
treee11a485455b596aee31ee34a9cbd2c5e6dec73b2 /test-it.c
parent97610277154e09a37793190d8e6d3d2a9d111fc1 (diff)
Adding small test software.
Diffstat (limited to 'test-it.c')
-rw-r--r--test-it.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/test-it.c b/test-it.c
new file mode 100644
index 0000000..0d13e87
--- /dev/null
+++ b/test-it.c
@@ -0,0 +1,25 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include "mpq-bios.h"
+#include "mpq-errors.h"
+
+int main(int argc, char ** argv) {
+ mpq_archive_t * t1;
+ char * fname = "test.mpq";
+
+ mpqlib_init();
+
+ if (argc == 2)
+ fname = argv[1];
+
+ t1 = mpqlib_open_archive(fname);
+ if (!t1) {
+ printf("Open error: %s.\n", mpqlib_error());
+ perror("Details");
+ exit(-1);
+ }
+
+ mpqlib_printtables(t1);
+
+ mpqlib_close_archive(t1);
+}