From e1a4bd03ec843ac7bd12aab143c66bd5e2c5eb15 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Tue, 1 Apr 2014 17:37:38 +0200 Subject: test: Add new timezone tests --- test/Makefile.am | 4 +++- test/timezone1.test | 15 +++++++++++++++ test/timezone2.test | 19 +++++++++++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100755 test/timezone1.test create mode 100755 test/timezone2.test (limited to 'test') 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 -- cgit v1.1-32-gdbae