summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2016-09-19 03:19:45 +0200
committerGravatar Nikias Bassen2016-09-19 03:19:45 +0200
commita3263ad344ff315ac1cba96f0b84b9afff6da787 (patch)
treedac86bc9740951c1f2bc4821abbf0face02e0f7e /test
parent8d34de3078469aba636846a15bad08198f66fdc8 (diff)
downloadlibplist-a3263ad344ff315ac1cba96f0b84b9afff6da787.tar.gz
libplist-a3263ad344ff315ac1cba96f0b84b9afff6da787.tar.bz2
test: Add additional test case to check extended date range
Diffstat (limited to 'test')
-rw-r--r--test/Makefile.am1
-rw-r--r--test/data/7.plist4
-rwxr-xr-xtest/dates.test15
3 files changed, 20 insertions, 0 deletions
diff --git a/test/Makefile.am b/test/Makefile.am
index 522c499..7113a55 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -22,6 +22,7 @@ TESTS = \
largecmp.test \
hugecmp.test \
bigarraycmp.test \
+ dates.test \
timezone1.test \
timezone2.test \
signedunsigned1.test \
diff --git a/test/data/7.plist b/test/data/7.plist
index 144a40d..a936852 100644
--- a/test/data/7.plist
+++ b/test/data/7.plist
@@ -6,5 +6,9 @@
<date>2010-11-12T13:14:15Z</date>
<key>Time2</key>
<date>2008-07-06T05:04:03Z</date>
+ <key>Time3</key>
+ <date>1869-01-03T08:16:32Z</date>
+ <key>Time2</key>
+ <date>2199-08-20T01:10:11Z</date>
</dict>
</plist>
diff --git a/test/dates.test b/test/dates.test
new file mode 100755
index 0000000..9d75471
--- /dev/null
+++ b/test/dates.test
@@ -0,0 +1,15 @@
+## -*- sh -*-
+
+set -e
+
+DATASRC=$top_srcdir/test/data
+TESTFILE=7.plist
+DATAIN0=$DATASRC/$TESTFILE
+DATAOUT0=$top_builddir/test/data/$TESTFILE.bplist
+DATAOUT1=$top_builddir/test/data/$TESTFILE.xplist
+
+$top_builddir/tools/plistutil -i $DATAIN0 -o $DATAOUT0
+$top_builddir/tools/plistutil -i $DATAOUT0 -o $DATAOUT1
+
+$top_builddir/test/plist_cmp $DATAOUT0 $DATAIN0
+$top_builddir/test/plist_cmp $DATAOUT1 $DATAIN0