summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/Makefile.am4
-rwxr-xr-xtest/timezone1.test15
-rwxr-xr-xtest/timezone2.test19
3 files changed, 37 insertions, 1 deletions
diff --git a/test/Makefile.am b/test/Makefile.am
index e9ed289..231d138 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -21,7 +21,9 @@ TESTS = \
mediumcmp.test \
largecmp.test \
hugecmp.test \
- bigarraycmp.test
+ bigarraycmp.test \
+ timezone1.test \
+ timezone2.test
EXTRA_DIST = $(TESTS) data/1.plist data/2.plist data/3.plist data/4.plist data/5.plist data/6.plist
diff --git a/test/timezone1.test b/test/timezone1.test
new file mode 100755
index 0000000..b992199
--- /dev/null
+++ b/test/timezone1.test
@@ -0,0 +1,15 @@
+## -*- sh -*-
+
+DATASRC=$top_srcdir/test/data
+TESTFILE=2.plist
+DATAIN0=$DATASRC/$TESTFILE
+DATAOUT0=$top_builddir/test/data/$TESTFILE.tz0.bin
+DATAOUT1=$top_builddir/test/data/$TESTFILE.tz1.bin
+DATAOUT2=$top_builddir/test/data/$TESTFILE.tz2.bin
+
+TZ=UTC $top_builddir/tools/plistutil -i $DATAIN0 -o $DATAOUT0
+TZ=Asia/Singapore $top_builddir/tools/plistutil -i $DATAIN0 -o $DATAOUT1
+TZ=US/Pacific $top_builddir/tools/plistutil -i $DATAIN0 -o $DATAOUT2
+
+$top_builddir/test/plist_cmp $DATAOUT0 $DATAOUT1
+$top_builddir/test/plist_cmp $DATAOUT0 $DATAOUT2
diff --git a/test/timezone2.test b/test/timezone2.test
new file mode 100755
index 0000000..3f3278c
--- /dev/null
+++ b/test/timezone2.test
@@ -0,0 +1,19 @@
+## -*- sh -*-
+
+DATASRC=$top_srcdir/test/data
+TESTFILE=2.plist
+DATAIN0=$DATASRC/$TESTFILE
+DATAOUT0=$top_builddir/test/data/$TESTFILE.bin
+DATAOUT1=$top_builddir/test/data/$TESTFILE.tz0.xml
+DATAOUT2=$top_builddir/test/data/$TESTFILE.tz1.xml
+DATAOUT3=$top_builddir/test/data/$TESTFILE.tz2.xml
+
+TZ=UTC $top_builddir/tools/plistutil -i $DATAIN0 -o $DATAOUT0
+
+TZ=UTC $top_builddir/tools/plistutil -i $DATAOUT0 -o $DATAOUT1
+TZ=Asia/Singapore $top_builddir/tools/plistutil -i $DATAOUT0 -o $DATAOUT2
+TZ=US/Pacific $top_builddir/tools/plistutil -i $DATAOUT0 -o $DATAOUT3
+
+$top_builddir/test/plist_cmp $DATAIN0 $DATAOUT1
+$top_builddir/test/plist_cmp $DATAIN0 $DATAOUT2
+$top_builddir/test/plist_cmp $DATAIN0 $DATAOUT3