changeset 2524:c1974f65d781

add more testcases for date parsing
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Fri, 30 Jun 2006 18:57:04 +0200
parents 4ab59a3acd16
children c49dc6f38a19 7a90e0c77f43
files tests/test-parse-date tests/test-parse-date.out
diffstat 2 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-parse-date	Fri Jun 30 18:48:06 2006 +0200
+++ b/tests/test-parse-date	Fri Jun 30 18:57:04 2006 +0200
@@ -11,4 +11,6 @@
 hg ci -d "1150000000 14400" -m "rev 4 (merge)"
 echo "fail" >> a
 hg ci -d "should fail" -m "fail"
+hg ci -d "100000000000000000 1400" -m "fail"
+hg ci -d "100000 1400000" -m "fail"
 hg log --template '{date|date}\n'
--- a/tests/test-parse-date.out	Fri Jun 30 18:48:06 2006 +0200
+++ b/tests/test-parse-date.out	Fri Jun 30 18:57:04 2006 +0200
@@ -6,6 +6,12 @@
 abort: invalid date: 'should fail'
 transaction abort!
 rollback completed
+abort: date exceeds 32 bits: 100000000000000000
+transaction abort!
+rollback completed
+abort: impossible time zone offset: 1400000
+transaction abort!
+rollback completed
 Sun Jun 11 00:26:40 2006 -0400
 Sat Apr 15 13:30:00 2006 +0200
 Sat Apr 15 13:30:00 2006 +0000