summaryrefslogtreecommitdiff
path: root/test/psych/test_scalar_scanner.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/psych/test_scalar_scanner.rb')
-rw-r--r--test/psych/test_scalar_scanner.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/psych/test_scalar_scanner.rb b/test/psych/test_scalar_scanner.rb
index 1397020c88..8483eabc7d 100644
--- a/test/psych/test_scalar_scanner.rb
+++ b/test/psych/test_scalar_scanner.rb
@@ -21,6 +21,17 @@ module Psych
end
end
+ def test_scan_bad_time
+ [ '2001-12-15T02:59:73.1Z',
+ '2001-12-14t90:59:43.10-05:00',
+ '2001-92-14 21:59:43.10 -5',
+ '2001-12-15 92:59:43.10',
+ '2011-02-24 81:17:06 -0800',
+ ].each do |time_str|
+ assert_equal time_str, @ss.tokenize(time_str)
+ end
+ end
+
def test_scan_bad_dates
x = '2000-15-01'
assert_equal x, @ss.tokenize(x)