summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2008-11-10 19:08:49 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2008-11-10 19:08:49 +0000
commitb5aa13a47b66955a5198da1f88e1f93f09306a84 (patch)
treee5bcd583e0fbf9c24a4ba8ebfdf5077e1aba590d /test
parentfde2ab38d0a3f6f6f1aeb91ad3602d63180bdec9 (diff)
downloadiconv-b5aa13a47b66955a5198da1f88e1f93f09306a84.tar.gz
iconv-b5aa13a47b66955a5198da1f88e1f93f09306a84.tar.bz2
Test driver for library initialisation/finalisation
svn path=/trunk/iconv/; revision=5679
Diffstat (limited to 'test')
-rw-r--r--test/INDEX1
-rw-r--r--test/Makefile2
-rw-r--r--test/iconv.c22
3 files changed, 24 insertions, 1 deletions
diff --git a/test/INDEX b/test/INDEX
index 522f1cd..1ff2163 100644
--- a/test/INDEX
+++ b/test/INDEX
@@ -1,5 +1,6 @@
# Index for testcases
#
# Test Description DataDir
+iconv Iconv initialisation/finalisation
# Regression tests
diff --git a/test/Makefile b/test/Makefile
index c935707..e540107 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -35,7 +35,7 @@ d := $(DIR)
CFLAGS := $(CFLAGS) -I$(TOP)/src/ -I$(d)
# Tests
-TESTS_$(d) :=
+TESTS_$(d) := iconv
TESTS_$(d) := $(TESTS_$(d))
# Items for top-level makefile to use
diff --git a/test/iconv.c b/test/iconv.c
new file mode 100644
index 0000000..fd1eff7
--- /dev/null
+++ b/test/iconv.c
@@ -0,0 +1,22 @@
+#include <stdio.h>
+
+#include <iconv/iconv.h>
+
+#include "testutils.h"
+
+int main(int argc, char **argv)
+{
+ if (argc != 2) {
+ printf("Usage: %s <aliases_file>\n", argv[0]);
+ return 1;
+ }
+
+ assert(iconv_initialise(argv[1]) == 1);
+
+ iconv_finalise();
+
+ printf("PASS\n");
+
+ return 0;
+}
+