From b5aa13a47b66955a5198da1f88e1f93f09306a84 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Mon, 10 Nov 2008 19:08:49 +0000 Subject: Test driver for library initialisation/finalisation svn path=/trunk/iconv/; revision=5679 --- test/INDEX | 1 + test/Makefile | 2 +- test/iconv.c | 22 ++++++++++++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 test/iconv.c (limited to 'test') 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 + +#include + +#include "testutils.h" + +int main(int argc, char **argv) +{ + if (argc != 2) { + printf("Usage: %s \n", argv[0]); + return 1; + } + + assert(iconv_initialise(argv[1]) == 1); + + iconv_finalise(); + + printf("PASS\n"); + + return 0; +} + -- cgit v1.2.3