summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2012-07-12 20:34:34 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2012-07-12 20:34:34 +0000
commit0c6a5fa0d9719a40748d8726b4543f02f70518c1 (patch)
tree241f9ae619069ac5861d7621ade296102ab5de5d /test
downloadlibexif-tarball-master.tar.gz
Diffstat (limited to 'test')
-rw-r--r--test/Makefile.am21
-rw-r--r--test/Makefile.in841
-rw-r--r--test/nls/Makefile.am34
-rw-r--r--test/nls/Makefile.in649
-rw-r--r--test/nls/check-localedir.in25
-rw-r--r--test/nls/check-nls.in40
-rw-r--r--test/nls/print-localedir.c11
-rw-r--r--test/nls/test-codeset.c209
-rw-r--r--test/nls/test-nls.c105
-rw-r--r--test/test-integers.c64
-rw-r--r--test/test-mem.c67
-rw-r--r--test/test-mnote.c107
-rw-r--r--test/test-parse.c122
-rw-r--r--test/test-sorted.c50
-rw-r--r--test/test-tagtable.c220
-rw-r--r--test/test-value.c61
16 files changed, 2626 insertions, 0 deletions
diff --git a/test/Makefile.am b/test/Makefile.am
new file mode 100644
index 0000000..d0a3551
--- /dev/null
+++ b/test/Makefile.am
@@ -0,0 +1,21 @@
+SUBDIRS = nls
+
+# Notes about tests:
+# - Add "small" tests and stuff here.
+# - Add "big" tests and stuff to explicitly test for (fixed) bugs
+# to libexif-testsuite:
+# * We don't want to force people to download dozens of test images
+# just for one small library.
+# * Proper testing is done with the "exif" program in libexif-testsuite.
+# And this is just the lib - we don't have the program available
+# here yet.
+
+TESTS = test-mem test-value test-integers test-parse test-tagtable test-sorted
+
+TEST_IMAGES = $(top_srcdir)/daniel-andrews-sample.jpg
+export TEST_IMAGES
+
+check_PROGRAMS = test-mem test-mnote test-value test-integers test-parse \
+ test-tagtable test-sorted
+
+LDADD = $(top_builddir)/libexif/libexif.la $(LTLIBINTL)
diff --git a/test/Makefile.in b/test/Makefile.in
new file mode 100644
index 0000000..64b4fd8
--- /dev/null
+++ b/test/Makefile.in
@@ -0,0 +1,841 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+TESTS = test-mem$(EXEEXT) test-value$(EXEEXT) test-integers$(EXEEXT) \
+ test-parse$(EXEEXT) test-tagtable$(EXEEXT) \
+ test-sorted$(EXEEXT)
+check_PROGRAMS = test-mem$(EXEEXT) test-mnote$(EXEEXT) \
+ test-value$(EXEEXT) test-integers$(EXEEXT) test-parse$(EXEEXT) \
+ test-tagtable$(EXEEXT) test-sorted$(EXEEXT)
+subdir = test
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4m/gp-check-shell-environment.m4 \
+ $(top_srcdir)/m4m/gp-config-msg.m4 \
+ $(top_srcdir)/m4m/gp-documentation.m4 \
+ $(top_srcdir)/m4m/gp-gettext-hack.m4 \
+ $(top_srcdir)/m4m/stdint.m4 $(top_srcdir)/auto-m4/gettext.m4 \
+ $(top_srcdir)/auto-m4/iconv.m4 $(top_srcdir)/auto-m4/lib-ld.m4 \
+ $(top_srcdir)/auto-m4/lib-link.m4 \
+ $(top_srcdir)/auto-m4/lib-prefix.m4 \
+ $(top_srcdir)/auto-m4/libtool.m4 \
+ $(top_srcdir)/auto-m4/ltoptions.m4 \
+ $(top_srcdir)/auto-m4/ltsugar.m4 \
+ $(top_srcdir)/auto-m4/ltversion.m4 \
+ $(top_srcdir)/auto-m4/lt~obsolete.m4 \
+ $(top_srcdir)/auto-m4/nls.m4 $(top_srcdir)/auto-m4/po.m4 \
+ $(top_srcdir)/auto-m4/progtest.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+test_integers_SOURCES = test-integers.c
+test_integers_OBJECTS = test-integers.$(OBJEXT)
+test_integers_LDADD = $(LDADD)
+am__DEPENDENCIES_1 =
+test_integers_DEPENDENCIES = $(top_builddir)/libexif/libexif.la \
+ $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+test_mem_SOURCES = test-mem.c
+test_mem_OBJECTS = test-mem.$(OBJEXT)
+test_mem_LDADD = $(LDADD)
+test_mem_DEPENDENCIES = $(top_builddir)/libexif/libexif.la \
+ $(am__DEPENDENCIES_1)
+test_mnote_SOURCES = test-mnote.c
+test_mnote_OBJECTS = test-mnote.$(OBJEXT)
+test_mnote_LDADD = $(LDADD)
+test_mnote_DEPENDENCIES = $(top_builddir)/libexif/libexif.la \
+ $(am__DEPENDENCIES_1)
+test_parse_SOURCES = test-parse.c
+test_parse_OBJECTS = test-parse.$(OBJEXT)
+test_parse_LDADD = $(LDADD)
+test_parse_DEPENDENCIES = $(top_builddir)/libexif/libexif.la \
+ $(am__DEPENDENCIES_1)
+test_sorted_SOURCES = test-sorted.c
+test_sorted_OBJECTS = test-sorted.$(OBJEXT)
+test_sorted_LDADD = $(LDADD)
+test_sorted_DEPENDENCIES = $(top_builddir)/libexif/libexif.la \
+ $(am__DEPENDENCIES_1)
+test_tagtable_SOURCES = test-tagtable.c
+test_tagtable_OBJECTS = test-tagtable.$(OBJEXT)
+test_tagtable_LDADD = $(LDADD)
+test_tagtable_DEPENDENCIES = $(top_builddir)/libexif/libexif.la \
+ $(am__DEPENDENCIES_1)
+test_value_SOURCES = test-value.c
+test_value_OBJECTS = test-value.$(OBJEXT)
+test_value_LDADD = $(LDADD)
+test_value_DEPENDENCIES = $(top_builddir)/libexif/libexif.la \
+ $(am__DEPENDENCIES_1)
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+SOURCES = test-integers.c test-mem.c test-mnote.c test-parse.c \
+ test-sorted.c test-tagtable.c test-value.c
+DIST_SOURCES = test-integers.c test-mem.c test-mnote.c test-parse.c \
+ test-sorted.c test-tagtable.c test-value.c
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+ distdir
+ETAGS = etags
+CTAGS = ctags
+am__tty_colors = \
+red=; grn=; lgn=; blu=; std=
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_CPPFLAGS = @AM_CPPFLAGS@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AM_LDFLAGS = @AM_LDFLAGS@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOT = @DOT@
+DOXYGEN = @DOXYGEN@
+DOXYGEN_OUTPUT_DIR = @DOXYGEN_OUTPUT_DIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GMSGFMT = @GMSGFMT@
+GREP = @GREP@
+HAVE_DOT = @HAVE_DOT@
+HTML_APIDOC_DIR = @HTML_APIDOC_DIR@
+HTML_APIDOC_INTERNALS_DIR = @HTML_APIDOC_INTERNALS_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBEXIF_AGE = @LIBEXIF_AGE@
+LIBEXIF_CURRENT = @LIBEXIF_CURRENT@
+LIBEXIF_CURRENT_MIN = @LIBEXIF_CURRENT_MIN@
+LIBEXIF_REVISION = @LIBEXIF_REVISION@
+LIBEXIF_VERSION_INFO = @LIBEXIF_VERSION_INFO@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+POSUB = @POSUB@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+SUBDIRS = nls
+TEST_IMAGES = $(top_srcdir)/daniel-andrews-sample.jpg
+LDADD = $(top_builddir)/libexif/libexif.la $(LTLIBINTL)
+all: all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu test/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-checkPROGRAMS:
+ @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+test-integers$(EXEEXT): $(test_integers_OBJECTS) $(test_integers_DEPENDENCIES)
+ @rm -f test-integers$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_integers_OBJECTS) $(test_integers_LDADD) $(LIBS)
+test-mem$(EXEEXT): $(test_mem_OBJECTS) $(test_mem_DEPENDENCIES)
+ @rm -f test-mem$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_mem_OBJECTS) $(test_mem_LDADD) $(LIBS)
+test-mnote$(EXEEXT): $(test_mnote_OBJECTS) $(test_mnote_DEPENDENCIES)
+ @rm -f test-mnote$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_mnote_OBJECTS) $(test_mnote_LDADD) $(LIBS)
+test-parse$(EXEEXT): $(test_parse_OBJECTS) $(test_parse_DEPENDENCIES)
+ @rm -f test-parse$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_parse_OBJECTS) $(test_parse_LDADD) $(LIBS)
+test-sorted$(EXEEXT): $(test_sorted_OBJECTS) $(test_sorted_DEPENDENCIES)
+ @rm -f test-sorted$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_sorted_OBJECTS) $(test_sorted_LDADD) $(LIBS)
+test-tagtable$(EXEEXT): $(test_tagtable_OBJECTS) $(test_tagtable_DEPENDENCIES)
+ @rm -f test-tagtable$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_tagtable_OBJECTS) $(test_tagtable_LDADD) $(LIBS)
+test-value$(EXEEXT): $(test_value_OBJECTS) $(test_value_DEPENDENCIES)
+ @rm -f test-value$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_value_OBJECTS) $(test_value_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-integers.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mem.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mnote.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-parse.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sorted.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-tagtable.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-value.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+check-TESTS: $(TESTS)
+ @failed=0; all=0; xfail=0; xpass=0; skip=0; \
+ srcdir=$(srcdir); export srcdir; \
+ list=' $(TESTS) '; \
+ $(am__tty_colors); \
+ if test -n "$$list"; then \
+ for tst in $$list; do \
+ if test -f ./$$tst; then dir=./; \
+ elif test -f $$tst; then dir=; \
+ else dir="$(srcdir)/"; fi; \
+ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$tst[\ \ ]*) \
+ xpass=`expr $$xpass + 1`; \
+ failed=`expr $$failed + 1`; \
+ col=$$red; res=XPASS; \
+ ;; \
+ *) \
+ col=$$grn; res=PASS; \
+ ;; \
+ esac; \
+ elif test $$? -ne 77; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$tst[\ \ ]*) \
+ xfail=`expr $$xfail + 1`; \
+ col=$$lgn; res=XFAIL; \
+ ;; \
+ *) \
+ failed=`expr $$failed + 1`; \
+ col=$$red; res=FAIL; \
+ ;; \
+ esac; \
+ else \
+ skip=`expr $$skip + 1`; \
+ col=$$blu; res=SKIP; \
+ fi; \
+ echo "$${col}$$res$${std}: $$tst"; \
+ done; \
+ if test "$$all" -eq 1; then \
+ tests="test"; \
+ All=""; \
+ else \
+ tests="tests"; \
+ All="All "; \
+ fi; \
+ if test "$$failed" -eq 0; then \
+ if test "$$xfail" -eq 0; then \
+ banner="$$All$$all $$tests passed"; \
+ else \
+ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
+ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
+ fi; \
+ else \
+ if test "$$xpass" -eq 0; then \
+ banner="$$failed of $$all $$tests failed"; \
+ else \
+ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
+ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
+ fi; \
+ fi; \
+ dashes="$$banner"; \
+ skipped=""; \
+ if test "$$skip" -ne 0; then \
+ if test "$$skip" -eq 1; then \
+ skipped="($$skip test was not run)"; \
+ else \
+ skipped="($$skip tests were not run)"; \
+ fi; \
+ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$skipped"; \
+ fi; \
+ report=""; \
+ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+ report="Please report to $(PACKAGE_BUGREPORT)"; \
+ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$report"; \
+ fi; \
+ dashes=`echo "$$dashes" | sed s/./=/g`; \
+ if test "$$failed" -eq 0; then \
+ echo "$$grn$$dashes"; \
+ else \
+ echo "$$red$$dashes"; \
+ fi; \
+ echo "$$banner"; \
+ test -z "$$skipped" || echo "$$skipped"; \
+ test -z "$$report" || echo "$$report"; \
+ echo "$$dashes$$std"; \
+ test "$$failed" -eq 0; \
+ else :; fi
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
+ mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) check-am \
+ ctags-recursive install-am install-strip tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am check check-TESTS check-am clean \
+ clean-checkPROGRAMS clean-generic clean-libtool ctags \
+ ctags-recursive distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags tags-recursive uninstall uninstall-am
+
+export TEST_IMAGES
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/test/nls/Makefile.am b/test/nls/Makefile.am
new file mode 100644
index 0000000..3f0b1ab
--- /dev/null
+++ b/test/nls/Makefile.am
@@ -0,0 +1,34 @@
+nlstestscripts = check-localedir.sh # check-codeset.sh
+
+codeset_tests = test-codeset-default test-codeset-latin1 test-codeset-utf-8
+
+TESTS = $(nlstestscripts)
+
+check_SCRIPTS = $(nlstestscripts)
+
+check_PROGRAMS = print-localedir # $(codeset_tests)
+
+# test_codeset_default_SOURCES = test-codeset.c
+# test_codeset_default_CPPFLAGS = \
+# $(AM_CPPFLAGS) $(CPPFLAGS) \
+# -DCODESET_DEFAULT
+
+# test_codeset_utf_8_SOURCES = test-codeset.c
+# test_codeset_utf_8_CPPFLAGS = \
+# $(AM_CPPFLAGS) $(CPPFLAGS) \
+# -DCODESET_UTF_8
+
+# test_codeset_latin1_SOURCES = test-codeset.c
+# test_codeset_latin1_CPPFLAGS = \
+# $(AM_CPPFLAGS) $(CPPFLAGS) \
+# -DCODESET_LATIN1
+
+CLEANFILES = $(check_SCRIPTS)
+
+# test_nls_LDADD = $(top_builddir)/libexif/libexif.la $(INTLLIBS)
+
+EXTRA_DIST = check-localedir.in check-nls.in test-nls.c test-codeset.c
+
+.in.sh: Makefile
+ sed 's|@top_builddir\@|$(top_builddir)|g;s|@localedir\@|$(localedir)|g;s|@PRINT_LOCALEDIR\@|./print-localedir$(EXEEXT)|g;s|@build_alias\@|$(build_alias)|g;s|@host_alias\@|$(host_alias)|g;s|@codeset_tests\@|$(codeset_tests)|g;s|@DESTDIR\@|$(DESTDIR)|g' < $< > $@
+ chmod +x $@
diff --git a/test/nls/Makefile.in b/test/nls/Makefile.in
new file mode 100644
index 0000000..9ad742e
--- /dev/null
+++ b/test/nls/Makefile.in
@@ -0,0 +1,649 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+check_PROGRAMS = print-localedir$(EXEEXT)
+subdir = test/nls
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4m/gp-check-shell-environment.m4 \
+ $(top_srcdir)/m4m/gp-config-msg.m4 \
+ $(top_srcdir)/m4m/gp-documentation.m4 \
+ $(top_srcdir)/m4m/gp-gettext-hack.m4 \
+ $(top_srcdir)/m4m/stdint.m4 $(top_srcdir)/auto-m4/gettext.m4 \
+ $(top_srcdir)/auto-m4/iconv.m4 $(top_srcdir)/auto-m4/lib-ld.m4 \
+ $(top_srcdir)/auto-m4/lib-link.m4 \
+ $(top_srcdir)/auto-m4/lib-prefix.m4 \
+ $(top_srcdir)/auto-m4/libtool.m4 \
+ $(top_srcdir)/auto-m4/ltoptions.m4 \
+ $(top_srcdir)/auto-m4/ltsugar.m4 \
+ $(top_srcdir)/auto-m4/ltversion.m4 \
+ $(top_srcdir)/auto-m4/lt~obsolete.m4 \
+ $(top_srcdir)/auto-m4/nls.m4 $(top_srcdir)/auto-m4/po.m4 \
+ $(top_srcdir)/auto-m4/progtest.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+print_localedir_SOURCES = print-localedir.c
+print_localedir_OBJECTS = print-localedir.$(OBJEXT)
+print_localedir_LDADD = $(LDADD)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+SOURCES = print-localedir.c
+DIST_SOURCES = print-localedir.c
+ETAGS = etags
+CTAGS = ctags
+am__tty_colors = \
+red=; grn=; lgn=; blu=; std=
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_CPPFLAGS = @AM_CPPFLAGS@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AM_LDFLAGS = @AM_LDFLAGS@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOT = @DOT@
+DOXYGEN = @DOXYGEN@
+DOXYGEN_OUTPUT_DIR = @DOXYGEN_OUTPUT_DIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GMSGFMT = @GMSGFMT@
+GREP = @GREP@
+HAVE_DOT = @HAVE_DOT@
+HTML_APIDOC_DIR = @HTML_APIDOC_DIR@
+HTML_APIDOC_INTERNALS_DIR = @HTML_APIDOC_INTERNALS_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBEXIF_AGE = @LIBEXIF_AGE@
+LIBEXIF_CURRENT = @LIBEXIF_CURRENT@
+LIBEXIF_CURRENT_MIN = @LIBEXIF_CURRENT_MIN@
+LIBEXIF_REVISION = @LIBEXIF_REVISION@
+LIBEXIF_VERSION_INFO = @LIBEXIF_VERSION_INFO@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+POSUB = @POSUB@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+nlstestscripts = check-localedir.sh # check-codeset.sh
+codeset_tests = test-codeset-default test-codeset-latin1 test-codeset-utf-8
+TESTS = $(nlstestscripts)
+check_SCRIPTS = $(nlstestscripts)
+
+# test_codeset_default_SOURCES = test-codeset.c
+# test_codeset_default_CPPFLAGS = \
+# $(AM_CPPFLAGS) $(CPPFLAGS) \
+# -DCODESET_DEFAULT
+
+# test_codeset_utf_8_SOURCES = test-codeset.c
+# test_codeset_utf_8_CPPFLAGS = \
+# $(AM_CPPFLAGS) $(CPPFLAGS) \
+# -DCODESET_UTF_8
+
+# test_codeset_latin1_SOURCES = test-codeset.c
+# test_codeset_latin1_CPPFLAGS = \
+# $(AM_CPPFLAGS) $(CPPFLAGS) \
+# -DCODESET_LATIN1
+CLEANFILES = $(check_SCRIPTS)
+
+# test_nls_LDADD = $(top_builddir)/libexif/libexif.la $(INTLLIBS)
+EXTRA_DIST = check-localedir.in check-nls.in test-nls.c test-codeset.c
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .in .lo .o .obj .sh
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/nls/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu test/nls/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-checkPROGRAMS:
+ @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+print-localedir$(EXEEXT): $(print_localedir_OBJECTS) $(print_localedir_DEPENDENCIES)
+ @rm -f print-localedir$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(print_localedir_OBJECTS) $(print_localedir_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print-localedir.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+check-TESTS: $(TESTS)
+ @failed=0; all=0; xfail=0; xpass=0; skip=0; \
+ srcdir=$(srcdir); export srcdir; \
+ list=' $(TESTS) '; \
+ $(am__tty_colors); \
+ if test -n "$$list"; then \
+ for tst in $$list; do \
+ if test -f ./$$tst; then dir=./; \
+ elif test -f $$tst; then dir=; \
+ else dir="$(srcdir)/"; fi; \
+ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$tst[\ \ ]*) \
+ xpass=`expr $$xpass + 1`; \
+ failed=`expr $$failed + 1`; \
+ col=$$red; res=XPASS; \
+ ;; \
+ *) \
+ col=$$grn; res=PASS; \
+ ;; \
+ esac; \
+ elif test $$? -ne 77; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$tst[\ \ ]*) \
+ xfail=`expr $$xfail + 1`; \
+ col=$$lgn; res=XFAIL; \
+ ;; \
+ *) \
+ failed=`expr $$failed + 1`; \
+ col=$$red; res=FAIL; \
+ ;; \
+ esac; \
+ else \
+ skip=`expr $$skip + 1`; \
+ col=$$blu; res=SKIP; \
+ fi; \
+ echo "$${col}$$res$${std}: $$tst"; \
+ done; \
+ if test "$$all" -eq 1; then \
+ tests="test"; \
+ All=""; \
+ else \
+ tests="tests"; \
+ All="All "; \
+ fi; \
+ if test "$$failed" -eq 0; then \
+ if test "$$xfail" -eq 0; then \
+ banner="$$All$$all $$tests passed"; \
+ else \
+ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
+ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
+ fi; \
+ else \
+ if test "$$xpass" -eq 0; then \
+ banner="$$failed of $$all $$tests failed"; \
+ else \
+ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
+ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
+ fi; \
+ fi; \
+ dashes="$$banner"; \
+ skipped=""; \
+ if test "$$skip" -ne 0; then \
+ if test "$$skip" -eq 1; then \
+ skipped="($$skip test was not run)"; \
+ else \
+ skipped="($$skip tests were not run)"; \
+ fi; \
+ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$skipped"; \
+ fi; \
+ report=""; \
+ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+ report="Please report to $(PACKAGE_BUGREPORT)"; \
+ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$report"; \
+ fi; \
+ dashes=`echo "$$dashes" | sed s/./=/g`; \
+ if test "$$failed" -eq 0; then \
+ echo "$$grn$$dashes"; \
+ else \
+ echo "$$red$$dashes"; \
+ fi; \
+ echo "$$banner"; \
+ test -z "$$skipped" || echo "$$skipped"; \
+ test -z "$$report" || echo "$$report"; \
+ echo "$$dashes$$std"; \
+ test "$$failed" -eq 0; \
+ else :; fi
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(check_SCRIPTS)
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
+ clean-checkPROGRAMS clean-generic clean-libtool ctags \
+ distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am
+
+
+.in.sh: Makefile
+ sed 's|@top_builddir\@|$(top_builddir)|g;s|@localedir\@|$(localedir)|g;s|@PRINT_LOCALEDIR\@|./print-localedir$(EXEEXT)|g;s|@build_alias\@|$(build_alias)|g;s|@host_alias\@|$(host_alias)|g;s|@codeset_tests\@|$(codeset_tests)|g;s|@DESTDIR\@|$(DESTDIR)|g' < $< > $@
+ chmod +x $@
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/test/nls/check-localedir.in b/test/nls/check-localedir.in
new file mode 100644
index 0000000..9636d87
--- /dev/null
+++ b/test/nls/check-localedir.in
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+localedir="@localedir@"
+build_alias="@build_alias@"
+host_alias="@host_alias@"
+
+binlocaledir="`@PRINT_LOCALEDIR@ 2> /dev/null`"
+
+if test "${localedir}" = "${binlocaledir}"; then
+ echo "Makefile and binary agree on localedir \`${localedir}'. Good."
+ exit 0
+else
+ echo "Makefile and binary disagree on localedir. Bad."
+ echo " - Makefile says \`${localedir}'."
+ echo " - binary says \`${binlocaledir}'."
+
+ if test "${build_alias}" != "${host_alias}"; then
+ echo "However, you are cross-compiling, so this does not necessarily"
+ echo "have consequences."
+ exit 0
+ else
+ echo "Error: Could not determine binary localedir."
+ exit 1
+ fi
+fi
diff --git a/test/nls/check-nls.in b/test/nls/check-nls.in
new file mode 100644
index 0000000..f484940
--- /dev/null
+++ b/test/nls/check-nls.in
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+top_builddir="@top_builddir@"
+localedir="@localedir@"
+
+destdir="$(pwd)/tmp-root"
+
+if test -d "${top_builddir}"; then :; else
+ echo "top_builddir \`${top_builddir}' not found"
+ exit 3
+fi
+
+echo -n "Test installation of translated messages..."
+if (cd "${top_builddir}/po" && make DESTDIR="${destdir}" install > /dev/null 2>&1); then
+ echo " done."
+else
+ echo " FAILED."
+ echo "Could not create test installation of translated messages"
+ exit 2
+fi
+
+binlocaledir="$(./print-localedir)"
+mylocaledir="${destdir}${binlocaledir}"
+if test -d "${destdir}${binlocaledir}"; then
+ echo "Test installation contains localedir \`${binlocaledir}'."
+else
+ echo "localedir \`${binlocaledir}' does not exist"
+ exit 1
+fi
+
+testnls="./test-nls ${mylocaledir}"
+if ${testnls}; then
+ echo "NLS test successful"
+ rm -rf "${destdir}"
+ exit 0
+else
+ echo "NLS test failed, not removing test installation from"
+ echo " ${destdir}"
+ exit 1
+fi
diff --git a/test/nls/print-localedir.c b/test/nls/print-localedir.c
new file mode 100644
index 0000000..50e605b
--- /dev/null
+++ b/test/nls/print-localedir.c
@@ -0,0 +1,11 @@
+#include "config.h"
+#include "libexif/i18n.h"
+
+#include <stdio.h>
+
+int main()
+{
+ puts(LOCALEDIR);
+ puts("\n");
+ return 0;
+}
diff --git a/test/nls/test-codeset.c b/test/nls/test-codeset.c
new file mode 100644
index 0000000..fa47f79
--- /dev/null
+++ b/test/nls/test-codeset.c
@@ -0,0 +1,209 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <i18n.h>
+#include <langinfo.h>
+#include <libintl.h>
+
+/* return whether byte strings are equal or not.
+ * NULL strings are never equal
+ */
+static int my_streq(const char *va, const char *vb) {
+ const char *a = va;
+ const char *b = vb;
+ int i;
+ if ((NULL == a) || (NULL == b)) {
+ return 0;
+ }
+ for (i=0; a[i] != '\0' && b[i] != '\0'; i++) {
+ if (a[i] != b[i]) {
+ return 0;
+ }
+ }
+ return 1;
+}
+
+#if defined(CODESET_UTF_8)
+#define MY_CODESET "UTF-8"
+#elif defined(CODESET_LATIN1)
+#define MY_CODESET "iso-8859-1"
+#elif defined(CODESET_DEFAULT)
+#define MY_CODESET "default"
+#define bind_textdomain_codeset(domain,codeset) \
+ MY_CODESET
+#else
+#error Define one of the CODESET_* macros!
+#endif
+
+typedef struct {
+ char *locale;
+ char *orig;
+ char *latin1;
+ char *utf8;
+} TestCase;
+
+const TestCase testcases[] = {
+ { "de_DE",
+ N_("High saturation"),
+ /* &auml; latin1 oct 333 hex e4 dec 228 */
+ "Hohe S\344ttigung",
+ /* &auml; utf-8 oct 303 244 hex c3 a4 dec 195 164 */
+ "Hohe S\303\244ttigung" },
+ { "fr_FR",
+ N_("Not defined"),
+ /* &eacute; latin1 oct 351 hex e9 dec 233 */
+ "Non d\233fini",
+ /* &eacute; utf-8 oct 303 251 hex c3 dec 195 */
+ "Non d\303\251fini"
+ },
+ { "es_ES",
+ N_("High saturation"),
+ /* &oacute; latin1 oct hex dec 243 */
+ "Alta saturaci\363n",
+ /* &oacute; utf-8 oct hex c3 b3 dec */
+ "Alta saturaci\303\263n"
+ },
+ { NULL, NULL, NULL, NULL }
+};
+
+
+static int check(const int i)
+{
+ const char *oldtextdomain = textdomain(NULL);
+ const char *newtextdomain = textdomain(GETTEXT_PACKAGE);
+
+ const char *newcodeset = MY_CODESET;
+ const char *oldcodeset = bind_textdomain_codeset(GETTEXT_PACKAGE, NULL);
+ const char *realcodeset = bind_textdomain_codeset(GETTEXT_PACKAGE, MY_CODESET);
+
+ const char *orig = testcases[i].orig;
+ const char *transl = gettext(testcases[i].orig);
+ const char *latin1 = testcases[i].latin1;
+ const char *utf8 = testcases[i].utf8;
+
+ printf(
+ "Old textdomain: %s\n"
+ "New textdomain: %s\n",
+ oldtextdomain,
+ newtextdomain
+ );
+
+ if (NULL != oldcodeset) {
+ printf(
+ "Old codeset: \"%s\" (locale default)\n",
+ nl_langinfo(CODESET)
+ );
+ } else {
+ printf(
+ "Old codeset: \"%s\"\n",
+ oldcodeset
+ );
+ }
+
+ printf(
+ "Wanted codeset: %s\n"
+ "Real codeset: %s\n",
+ newcodeset,
+ realcodeset
+ );
+
+ printf(
+ "Original: %s\n"
+ "Translated: %s\n"
+ "iso-8859-1: %s\n"
+ "utf-8: %s\n",
+ orig,
+ transl,
+ latin1,
+ utf8
+ );
+
+#if defined(CODESET_UTF_8)
+ return (my_streq(transl, utf8));
+#elif defined(CODESET_LATIN_1)
+ return (my_streq(transl, latin1));
+#else
+ /* make sure my_streq is used once */
+ return (my_streq(orig, orig));
+#endif
+}
+
+
+static int checks()
+{
+ int i;
+
+ const char *localeenv = getenv("LOCALEDIR");
+ const char *localedir = (localeenv!=NULL)?localeenv:LOCALEDIR;
+ const char *msgcatdir = bindtextdomain(GETTEXT_PACKAGE, localedir);
+
+ /* set locale to env settings */
+ const char *oldlocale = setlocale(LC_ALL, NULL);
+ const char *newlocale = setlocale(LC_ALL, "");
+
+ if (localeenv != NULL) {
+ printf("Msg catalog dir: %s (from environment variable LOCALEDIR\n",
+ msgcatdir);
+ } else {
+ printf("Msg catalog dir: %s\n", msgcatdir);
+ }
+
+ if (newlocale == NULL) {
+ printf("Locale not available: \"%s\"\n", newlocale);
+ printf("Aborting without error.\n");
+ return 1;
+ }
+
+
+ printf(
+ "Old locale: %s\n"
+ "New locale: %s\n",
+ oldlocale,
+ newlocale
+ );
+
+ for (i=0; testcases[i].locale != NULL; i++) {
+ const int localelen = strlen(testcases[i].locale);
+ if (strncmp(newlocale, testcases[i].locale, localelen) == 0) {
+ return check(i);
+ }
+ }
+
+ printf("No test case found for locale: %s\n", newlocale);
+ return 1;
+}
+
+
+int main(int argc, char *argv[])
+{
+ if (argc > 1) {
+ if ((argc == 2) && (strcmp("--list", argv[1]) == 0)) {
+ int i;
+ for (i=0; testcases[i].locale != NULL; i++) {
+ printf("%s\n", testcases[i].locale);
+ }
+ return 0;
+ } else {
+ int i;
+ fprintf(stderr, "Illegal command line. Aborting.\n");
+ fprintf(stderr, "argc: %03d\n", argc);
+ for (i=0; i<argc; i++) {
+ fprintf(stderr, "%03d \"%s\"\n", i, argv[i]);
+ }
+ return 1;
+ }
+ } else {
+ int ret = checks();
+ printf("Test result: %s\n", (ret)?"success":"failure");
+ return (ret)?0:1;
+ }
+ return -1;
+}
+
+/*
+ * Local Variables:
+ * mode:c
+ * c-basic-offset: 8
+ * End:
+ */
diff --git a/test/nls/test-nls.c b/test/nls/test-nls.c
new file mode 100644
index 0000000..6080d7a
--- /dev/null
+++ b/test/nls/test-nls.c
@@ -0,0 +1,105 @@
+#include "config.h"
+
+#include "i18n.h"
+#include <locale.h>
+
+#include <stdio.h>
+#include <string.h>
+
+struct _testcase {
+ char *locale;
+ char *untranslated;
+ char *expected;
+};
+
+typedef struct _testcase testcase;
+
+/* Translators: Just ignore the stuff in the test subdirectory. */
+static testcase testcases[] = {
+ { "de_DE.UTF-8",
+ N_("[DO_NOT_TRANSLATE_THIS_MARKER]"),
+ "[DO_NOT_TRANSLATE_THIS_MARKER_de]" },
+ { "C",
+ N_("[DO_NOT_TRANSLATE_THIS_MARKER]"),
+ N_("[DO_NOT_TRANSLATE_THIS_MARKER]") },
+};
+
+int main(int argc, char *argv[])
+{
+ char *localedir;
+ int i;
+
+ if (argc != 2) {
+ puts("Syntax: test-nls <localedir>\n");
+ return 1;
+ }
+
+ localedir = argv[1];
+
+ do {
+ const char *newloc = setlocale(LC_ALL, NULL);
+ printf("Default locale: %s\n", newloc);
+ } while (0);
+
+
+ for (i=0; i < sizeof(testcases)/sizeof(testcases[0]); i++) {
+ char *locale = testcases[i].locale;
+ char *untranslated = testcases[i].untranslated;
+ char *expected = testcases[i].expected;
+ char *translation;
+
+ if (1) {
+ printf("setlocale(\"%s\")\n", locale);
+ const char *actual_locale = setlocale(LC_MESSAGES, locale);
+ if (actual_locale == NULL) {
+ fprintf(stderr, "Error: Cannot set locale to %s.\n", locale);
+ return 4;
+ }
+ printf("new locale: %s\n", actual_locale);
+ }
+
+ if (1) {
+ const char *basedir = bindtextdomain(GETTEXT_PACKAGE, localedir);
+ printf("message basedir: %s\n", basedir);
+ }
+
+ if (1) {
+ const char *domain = textdomain(GETTEXT_PACKAGE);
+ printf("message domain: %s\n", domain);
+ }
+
+ if (1) {
+ const char *codeset = bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
+ printf("message codeset: %s\n", codeset);
+ }
+
+ puts("before translation");
+ translation = gettext(untranslated);
+ puts("after translation");
+
+ if (strcmp(expected, translation) != 0) {
+ fprintf(stderr,
+ "locale: %s\n"
+ "localedir: %s\n"
+ "untranslated: %s\n"
+ "expected: %s\n"
+ "translation: %s\n"
+ "Error: translation != expected\n",
+ locale,
+ localedir,
+ untranslated,
+ expected,
+ translation);
+
+ return 1;
+ } else {
+ fprintf(stderr,
+ "expected: %s\n"
+ "translation: %s\n"
+ "Match!\n",
+ expected,
+ translation);
+ }
+ }
+ return 0;
+}
diff --git a/test/test-integers.c b/test/test-integers.c
new file mode 100644
index 0000000..6af7534
--- /dev/null
+++ b/test/test-integers.c
@@ -0,0 +1,64 @@
+/** \file test-integers.c
+ * \brief Check assumptions about integer types (sizes, ranges).
+ *
+ * Copyright (C) 2007 Hans Ulrich Niedermann <gp@n-dimensional.de>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ */
+
+
+#include "libexif/_stdint.h"
+#include <stdlib.h>
+#include <stdio.h>
+
+
+typedef enum {
+ EN_A,
+ EN_B,
+ EN_C,
+ EN_D,
+ EN_E,
+ EN_F
+} enum_t;
+
+
+#if defined(__GNUC__) && (__GNUC__ >= 4)
+# define CHECK(condition) \
+ if (!(condition)) { \
+ fprintf(stderr, "%s:%d: check failed: %s\n", \
+ __FILE__, __LINE__, #condition); \
+ errors++; \
+ }
+#else
+# define CHECK(condition) \
+ if (!(condition)) { \
+ abort(); \
+ }
+#endif
+
+
+int main()
+{
+ unsigned int errors = 0;
+
+ /* libexif assumes unsigned ints are not smaller than 32bit in many places */
+ CHECK(sizeof(unsigned int) >= sizeof(uint32_t));
+
+ /* libexif assumes that enums fit into ints */
+ CHECK(sizeof(enum_t) <= sizeof(int));
+
+ return (errors>0)?1:0;
+}
diff --git a/test/test-mem.c b/test/test-mem.c
new file mode 100644
index 0000000..d4459a9
--- /dev/null
+++ b/test/test-mem.c
@@ -0,0 +1,67 @@
+/* test-mem.c
+ *
+ * Copyright (c) 2002 Lutz Mueller <lutz@users.sourceforge.net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ */
+
+#include <config.h>
+
+#include <libexif/exif-data.h>
+#include <libexif/exif-ifd.h>
+#include <libexif/exif-loader.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main ()
+{
+ ExifData *ed;
+ /* ExifEntry *e; */
+ unsigned char *eb, size[2];
+ unsigned int ebs;
+ ExifLoader *loader;
+ unsigned int i;
+
+ printf ("Creating EXIF data...\n");
+ ed = exif_data_new ();
+ exif_data_set_data_type (ed, EXIF_DATA_TYPE_UNCOMPRESSED_CHUNKY);
+
+ printf ("Fill EXIF data with all necessary entries to follow specs...\n");
+ exif_data_fix (ed);
+
+ exif_data_dump (ed);
+
+ printf ("Saving EXIF data to memory...\n");
+ exif_data_save_data (ed, &eb, &ebs);
+ exif_data_unref (ed);
+
+ printf ("Writing %i byte(s) EXIF data to loader...\n", ebs);
+ loader = exif_loader_new ();
+ size[0] = (unsigned char) ebs;
+ size[1] = (unsigned char) (ebs >> 8);
+ exif_loader_write (loader, size, 2);
+ for (i = 0; i < ebs && exif_loader_write (loader, eb + i, 1); i++);
+ printf ("Wrote %i byte(s).\n", i);
+ free (eb);
+ ed = exif_loader_get_data (loader);
+ exif_loader_unref (loader);
+ exif_data_dump (ed);
+ exif_data_unref (ed);
+
+ return 0;
+}
diff --git a/test/test-mnote.c b/test/test-mnote.c
new file mode 100644
index 0000000..3864065
--- /dev/null
+++ b/test/test-mnote.c
@@ -0,0 +1,107 @@
+/* exif-mnote.c
+ *
+ * Copyright 2002 Lutz M\uffffller <lutz@users.sourceforge.net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <libexif/exif-data.h>
+
+static int
+test_exif_data (ExifData *d)
+{
+ unsigned int i, c;
+ char v[1024], *p;
+ ExifMnoteData *md;
+
+ fprintf (stdout, "Byte order: %s\n",
+ exif_byte_order_get_name (exif_data_get_byte_order (d)));
+
+ fprintf (stdout, "Parsing maker note...\n");
+ md = exif_data_get_mnote_data (d);
+ if (!md) {
+ fprintf (stderr, "Could not parse maker note!\n");
+ exif_data_unref (d);
+ return 1;
+ }
+
+ fprintf (stdout, "Increasing ref-count...\n");
+ exif_mnote_data_ref (md);
+
+ fprintf (stdout, "Decreasing ref-count...\n");
+ exif_mnote_data_unref (md);
+
+ fprintf (stdout, "Counting entries...\n");
+ c = exif_mnote_data_count (md);
+ fprintf (stdout, "Found %i entries.\n", c);
+ for (i = 0; i < c; i++) {
+ fprintf (stdout, "Dumping entry number %i...\n", i);
+ fprintf (stdout, " Name: '%s'\n",
+ exif_mnote_data_get_name (md, i));
+ fprintf (stdout, " Title: '%s'\n",
+ exif_mnote_data_get_title (md, i));
+ fprintf (stdout, " Description: '%s'\n",
+ exif_mnote_data_get_description (md, i));
+ p = exif_mnote_data_get_value (md, i, v, sizeof (v));
+ if (p) { fprintf (stdout, " Value: '%s'\n", v); }
+ }
+
+ return 0;
+}
+
+int
+main (int argc, char **argv)
+{
+ ExifData *d;
+ unsigned int buf_size;
+ unsigned char *buf;
+ int r;
+
+ if (argc <= 1) {
+ fprintf (stderr, "You need to supply a filename!\n");
+ return 1;
+ }
+
+ fprintf (stdout, "Loading '%s'...\n", argv[1]);
+ d = exif_data_new_from_file (argv[1]);
+ if (!d) {
+ fprintf (stderr, "Could not load data from '%s'!\n", argv[1]);
+ return 1;
+ }
+ fprintf (stdout, "Loaded '%s'.\n", argv[1]);
+
+ fprintf (stdout, "######### Test 1 #########\n");
+ r = test_exif_data (d);
+ if (r) return r;
+
+ exif_data_save_data (d, &buf, &buf_size);
+ exif_data_unref (d);
+ d = exif_data_new_from_data (buf, buf_size);
+ free (buf);
+
+ fprintf (stdout, "######### Test 2 #########\n");
+ r = test_exif_data (d);
+ if (r) return r;
+
+ fprintf (stdout, "Test successful!\n");
+
+ return 1;
+}
diff --git a/test/test-parse.c b/test/test-parse.c
new file mode 100644
index 0000000..83889e6
--- /dev/null
+++ b/test/test-parse.c
@@ -0,0 +1,122 @@
+/** \file test-parse.c
+ * \brief Completely parse all files given on the command line.
+ *
+ * Copyright (C) 2007 Hans Ulrich Niedermann <gp@n-dimensional.de>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ */
+
+#include "libexif/exif-data.h"
+#include "libexif/exif-system.h"
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+
+/** Callback function handling an ExifEntry. */
+void content_foreach_func(ExifEntry *entry, void *callback_data);
+void content_foreach_func(ExifEntry *entry, void *UNUSED(callback_data))
+{
+ char buf[2000];
+ exif_entry_get_value(entry, buf, sizeof(buf));
+ printf(" Entry %p: %s (%s)\n"
+ " Size, Comps: %d, %d\n"
+ " Value: %s\n",
+ entry,
+ exif_tag_get_name(entry->tag),
+ exif_format_get_name(entry->format),
+ entry->size,
+ (int)(entry->components),
+ exif_entry_get_value(entry, buf, sizeof(buf)));
+}
+
+
+/** Callback function handling an ExifContent (corresponds 1:1 to an IFD). */
+void data_foreach_func(ExifContent *content, void *callback_data);
+void data_foreach_func(ExifContent *content, void *callback_data)
+{
+ printf(" Content %p: ifd=%d\n", content, exif_content_get_ifd(content));
+ exif_content_foreach_entry(content, content_foreach_func, callback_data);
+}
+
+
+/** Run EXIF parsing test on the given file. */
+void test_parse(const char *filename, void *callback_data);
+void test_parse(const char *filename, void *callback_data)
+{
+ ExifData *d;
+ printf("File %s\n", filename);
+
+ d = exif_data_new_from_file(filename);
+ exif_data_foreach_content(d, data_foreach_func, callback_data);
+ exif_data_unref(d);
+}
+
+
+/** Callback function prototype for string parsing. */
+typedef void (*test_parse_func) (const char *filename, void *callback_data);
+
+
+/** Split string at whitespace and call callback with each substring. */
+void split_ws_string(const char *string, test_parse_func func, void *callback_data);
+void split_ws_string(const char *string, test_parse_func func, void *callback_data)
+{
+ const char *start = string;
+ const char *p = start;
+ for (;;) {
+ if (*p == ' ' || *p == '\t' || *p == '\n' || *p == '\r' || *p == '\0' ) {
+ size_t len = p-start;
+ if (len > 0) {
+ /* emulate strndup */
+ char *str = malloc(1+len);
+ if (str) {
+ memcpy(str, start, len);
+ str[len] = '\0';
+ func(str, callback_data);
+ free(str);
+ start = p+1;
+ }
+ } else {
+ start = p+1;
+ }
+ }
+ if (*p == '\0') {
+ break;
+ }
+ p++;
+ }
+}
+
+
+/** Main program. */
+int main(const int argc, const char *argv[])
+{
+ int i;
+ void *callback_data = NULL;
+
+ const char *envar = getenv("TEST_IMAGES");
+ if (envar) {
+ split_ws_string(envar, test_parse, callback_data);
+ }
+
+ for (i=1; i<argc; i++) {
+ test_parse(argv[i], callback_data);
+ }
+
+ return 0;
+}
diff --git a/test/test-sorted.c b/test/test-sorted.c
new file mode 100644
index 0000000..0d00317
--- /dev/null
+++ b/test/test-sorted.c
@@ -0,0 +1,50 @@
+/* test-sorted.c
+ *
+ * This test ensures that the ExifTagTable[] array is stored in sorted
+ * order. If that were not so, then it a binary search of the array would
+ * not give correct results.
+ *
+ * Copyright 2009 Dan Fandrich <dan@coneharvesters.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA
+ */
+
+#include <libexif/exif-tag.h>
+#include <stdio.h>
+
+int
+main (void)
+{
+ int rc = 0;
+ unsigned int i, num;
+ ExifTag last = 0, current;
+ num = exif_tag_table_count() - 1; /* last entry is a NULL terminator */
+ for (i=0; i < num; ++i) {
+ current = exif_tag_table_get_tag(i);
+ if (current < last) {
+ printf("Tag 0x%04x in ExifTagTable[] is out of order\n",
+ current);
+ rc = 1;
+ }
+ if (exif_tag_table_get_name(i) == NULL) {
+ printf("Tag 0x%04x has a NULL name\n", current);
+ rc = 1;
+ }
+ last = current;
+ }
+
+ return rc;
+}
diff --git a/test/test-tagtable.c b/test/test-tagtable.c
new file mode 100644
index 0000000..d4af368
--- /dev/null
+++ b/test/test-tagtable.c
@@ -0,0 +1,220 @@
+/* test-tagtable.c
+ *
+ * Test various functions that involve the tag table.
+ *
+ * Copyright (c) 2009 Dan Fandrich <dan@coneharvesters.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ */
+
+#include "config.h"
+#include <libexif/exif-tag.h>
+#include <stdio.h>
+#include <string.h>
+
+#define VALIDATE(s) if (!(s)) {printf("Test %s FAILED\n", #s); fail=1;}
+
+#define TESTBLOCK(t) {int rc = (t); fail |= rc; \
+ if (rc) printf("%s tests FAILED\n", #t);}
+
+/* Test exif_tag_get_support_level_in_ifd */
+static int support_level(void)
+{
+ int fail = 0;
+
+ /*
+ * The tag EXIF_TAG_PLANAR_CONFIGURATION support varies greatly between
+ * data types.
+ */
+ VALIDATE(exif_tag_get_support_level_in_ifd(EXIF_TAG_PLANAR_CONFIGURATION,
+ EXIF_IFD_0, EXIF_DATA_TYPE_UNCOMPRESSED_CHUNKY) ==
+ EXIF_SUPPORT_LEVEL_OPTIONAL)
+
+ VALIDATE(exif_tag_get_support_level_in_ifd(EXIF_TAG_PLANAR_CONFIGURATION,
+ EXIF_IFD_0, EXIF_DATA_TYPE_UNCOMPRESSED_PLANAR) ==
+ EXIF_SUPPORT_LEVEL_MANDATORY)
+
+ VALIDATE(exif_tag_get_support_level_in_ifd(EXIF_TAG_PLANAR_CONFIGURATION,
+ EXIF_IFD_0, EXIF_DATA_TYPE_UNCOMPRESSED_YCC) ==
+ EXIF_SUPPORT_LEVEL_OPTIONAL)
+
+ VALIDATE(exif_tag_get_support_level_in_ifd(EXIF_TAG_PLANAR_CONFIGURATION,
+ EXIF_IFD_0, EXIF_DATA_TYPE_COMPRESSED) ==
+ EXIF_SUPPORT_LEVEL_NOT_RECORDED)
+
+ VALIDATE(exif_tag_get_support_level_in_ifd(EXIF_TAG_PLANAR_CONFIGURATION,
+ EXIF_IFD_0, EXIF_DATA_TYPE_UNKNOWN) ==
+ EXIF_SUPPORT_LEVEL_UNKNOWN)
+
+ /*
+ * The tag EXIF_TAG_YCBCR_POSITIONING support varies greatly between
+ * IFDs
+ */
+ VALIDATE(exif_tag_get_support_level_in_ifd(EXIF_TAG_YCBCR_POSITIONING,
+ EXIF_IFD_0, EXIF_DATA_TYPE_COMPRESSED) ==
+ EXIF_SUPPORT_LEVEL_MANDATORY)
+
+ VALIDATE(exif_tag_get_support_level_in_ifd(EXIF_TAG_YCBCR_POSITIONING,
+ EXIF_IFD_1, EXIF_DATA_TYPE_COMPRESSED) ==
+ EXIF_SUPPORT_LEVEL_OPTIONAL)
+
+ VALIDATE(exif_tag_get_support_level_in_ifd(EXIF_TAG_YCBCR_POSITIONING,
+ EXIF_IFD_EXIF, EXIF_DATA_TYPE_COMPRESSED) ==
+ EXIF_SUPPORT_LEVEL_NOT_RECORDED)
+
+ VALIDATE(exif_tag_get_support_level_in_ifd(EXIF_TAG_YCBCR_POSITIONING,
+ EXIF_IFD_GPS, EXIF_DATA_TYPE_COMPRESSED) ==
+ EXIF_SUPPORT_LEVEL_NOT_RECORDED)
+
+ VALIDATE(exif_tag_get_support_level_in_ifd(EXIF_TAG_YCBCR_POSITIONING,
+ EXIF_IFD_INTEROPERABILITY, EXIF_DATA_TYPE_COMPRESSED) ==
+ EXIF_SUPPORT_LEVEL_NOT_RECORDED)
+
+
+ /*
+ * The tag EXIF_TAG_GPS_VERSION_ID has value 0 which should NOT be
+ * treated specially
+ */
+ VALIDATE(exif_tag_get_support_level_in_ifd(EXIF_TAG_GPS_VERSION_ID,
+ EXIF_IFD_GPS, EXIF_DATA_TYPE_COMPRESSED) ==
+ EXIF_SUPPORT_LEVEL_OPTIONAL)
+
+ VALIDATE(exif_tag_get_support_level_in_ifd(EXIF_TAG_GPS_VERSION_ID,
+ EXIF_IFD_GPS, EXIF_DATA_TYPE_UNKNOWN) ==
+ EXIF_SUPPORT_LEVEL_OPTIONAL)
+
+ VALIDATE(exif_tag_get_support_level_in_ifd(EXIF_TAG_GPS_VERSION_ID,
+ EXIF_IFD_0, EXIF_DATA_TYPE_COMPRESSED) ==
+ EXIF_SUPPORT_LEVEL_NOT_RECORDED)
+
+ VALIDATE(exif_tag_get_support_level_in_ifd(EXIF_TAG_GPS_VERSION_ID,
+ EXIF_IFD_0, EXIF_DATA_TYPE_UNKNOWN) ==
+ EXIF_SUPPORT_LEVEL_UNKNOWN)
+
+ /* The unused tag 0xffff should NOT be treated specially */
+ VALIDATE(exif_tag_get_support_level_in_ifd(0xffff,
+ EXIF_IFD_0, EXIF_DATA_TYPE_UNKNOWN) ==
+ EXIF_SUPPORT_LEVEL_UNKNOWN)
+
+ VALIDATE(exif_tag_get_support_level_in_ifd(0xffff,
+ EXIF_IFD_0, EXIF_DATA_TYPE_COMPRESSED) ==
+ EXIF_SUPPORT_LEVEL_NOT_RECORDED)
+
+ /*
+ * The tag EXIF_TAG_DOCUMENT_NAME isn't in the EXIF 2.2 standard but
+ * it exists in the tag table, which causes it to show up as unknown
+ * instead of not recorded.
+ */
+ VALIDATE(exif_tag_get_support_level_in_ifd(EXIF_TAG_DOCUMENT_NAME,
+ EXIF_IFD_0, EXIF_DATA_TYPE_UNKNOWN) ==
+ EXIF_SUPPORT_LEVEL_UNKNOWN)
+
+ VALIDATE(exif_tag_get_support_level_in_ifd(EXIF_TAG_DOCUMENT_NAME,
+ EXIF_IFD_1, EXIF_DATA_TYPE_UNCOMPRESSED_CHUNKY) ==
+ EXIF_SUPPORT_LEVEL_UNKNOWN)
+
+
+ /*
+ * The tag number for EXIF_TAG_INTEROPERABILITY_INDEX (1) exists in both
+ * IFD Interoperability and IFD GPS (as EXIF_TAG_GPS_LATITUDE_REF) so
+ * there are two entries in the table.
+ */
+ VALIDATE(exif_tag_get_support_level_in_ifd(EXIF_TAG_INTEROPERABILITY_INDEX,
+ EXIF_IFD_INTEROPERABILITY, EXIF_DATA_TYPE_COMPRESSED) ==
+ EXIF_SUPPORT_LEVEL_OPTIONAL)
+
+ VALIDATE(exif_tag_get_support_level_in_ifd(EXIF_TAG_INTEROPERABILITY_INDEX,
+ EXIF_IFD_INTEROPERABILITY, EXIF_DATA_TYPE_UNKNOWN) ==
+ EXIF_SUPPORT_LEVEL_OPTIONAL)
+
+ VALIDATE(exif_tag_get_support_level_in_ifd(EXIF_TAG_INTEROPERABILITY_INDEX,
+ EXIF_IFD_0, EXIF_DATA_TYPE_COMPRESSED) ==
+ EXIF_SUPPORT_LEVEL_NOT_RECORDED)
+
+ VALIDATE(exif_tag_get_support_level_in_ifd(EXIF_TAG_INTEROPERABILITY_INDEX,
+ EXIF_IFD_0, EXIF_DATA_TYPE_UNKNOWN) ==
+ EXIF_SUPPORT_LEVEL_UNKNOWN)
+
+ VALIDATE(exif_tag_get_support_level_in_ifd(EXIF_TAG_GPS_LATITUDE_REF,
+ EXIF_IFD_GPS, EXIF_DATA_TYPE_COMPRESSED) ==
+ EXIF_SUPPORT_LEVEL_OPTIONAL)
+
+ VALIDATE(exif_tag_get_support_level_in_ifd(EXIF_TAG_GPS_LATITUDE_REF,
+ EXIF_IFD_GPS, EXIF_DATA_TYPE_UNKNOWN) ==
+ EXIF_SUPPORT_LEVEL_OPTIONAL)
+
+ /* The result of an unknown IFD should always be unknown */
+ VALIDATE(exif_tag_get_support_level_in_ifd(EXIF_TAG_EXIF_VERSION,
+ EXIF_IFD_COUNT, EXIF_DATA_TYPE_UNKNOWN) ==
+ EXIF_SUPPORT_LEVEL_UNKNOWN)
+
+ VALIDATE(exif_tag_get_support_level_in_ifd(EXIF_TAG_EXIF_VERSION,
+ EXIF_IFD_COUNT, EXIF_DATA_TYPE_COMPRESSED) ==
+ EXIF_SUPPORT_LEVEL_UNKNOWN)
+
+ return fail;
+}
+
+/* Test exif_tag_get_name_in_ifd */
+static int name(void)
+{
+ int fail = 0;
+
+ /*
+ * The tag EXIF_TAG_GPS_VERSION_ID has value 0 which should NOT be
+ * treated specially
+ */
+ VALIDATE(!strcmp(exif_tag_get_name_in_ifd(
+ EXIF_TAG_GPS_VERSION_ID, EXIF_IFD_GPS),
+ "GPSVersionID"))
+
+ VALIDATE(exif_tag_get_name_in_ifd(
+ EXIF_TAG_GPS_VERSION_ID, EXIF_IFD_0) == NULL)
+
+ /*
+ * The tag number for EXIF_TAG_INTEROPERABILITY_INDEX (1) exists in both
+ * IFD Interoperability and IFD GPS (as EXIF_TAG_GPS_LATITUDE_REF) so
+ * there are two entries in the table.
+ */
+ VALIDATE(!strcmp(exif_tag_get_name_in_ifd(
+ EXIF_TAG_INTEROPERABILITY_INDEX, EXIF_IFD_INTEROPERABILITY),
+ "InteroperabilityIndex"))
+
+ VALIDATE(!strcmp(exif_tag_get_name_in_ifd(
+ EXIF_TAG_GPS_LATITUDE_REF, EXIF_IFD_GPS),
+ "GPSLatitudeRef"))
+
+ /* Tag that doesn't appear in an IFD produces a NULL */
+ VALIDATE(exif_tag_get_name_in_ifd(
+ EXIF_TAG_EXIF_VERSION, EXIF_IFD_0) == NULL)
+
+ /* Invalid IFD produces a NULL */
+ VALIDATE(exif_tag_get_name_in_ifd(
+ EXIF_TAG_EXIF_VERSION, EXIF_IFD_COUNT) == NULL)
+
+ return fail;
+}
+
+int
+main ()
+{
+ int fail = 0;
+
+ TESTBLOCK(support_level())
+ TESTBLOCK(name())
+
+ return fail;
+}
diff --git a/test/test-value.c b/test/test-value.c
new file mode 100644
index 0000000..715ce10
--- /dev/null
+++ b/test/test-value.c
@@ -0,0 +1,61 @@
+/* test-value.c
+ *
+ * Copyright 2002 Lutz M\uffffller <lutz@users.sourceforge.net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ */
+
+#include <libexif/exif-utils.h>
+#include <libexif/exif-data.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main ()
+{
+ ExifData *d;
+ ExifEntry *e;
+ char v[1024];
+ ExifSRational r = {1., 20.};
+ unsigned int i;
+
+ d = exif_data_new ();
+ if (!d) {
+ printf ("Error running exif_data_new()\n");
+ exit(13);
+ }
+
+ e = exif_entry_new ();
+ if (!e) {
+ printf ("Error running exif_entry_new()\n");
+ exit(13);
+ }
+
+ exif_content_add_entry (d->ifd[EXIF_IFD_0], e);
+ exif_entry_initialize (e, EXIF_TAG_SHUTTER_SPEED_VALUE);
+ exif_set_srational (e->data, exif_data_get_byte_order (d), r);
+
+ for (i = 30; i > 0; i--) {
+ printf ("Length %2i: '%s'\n", i,
+ exif_entry_get_value (e, v, i));
+ }
+
+ exif_entry_unref (e);
+ exif_data_unref (d);
+
+ return 0;
+}