diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2017-03-07 08:40:00 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2017-03-07 08:40:00 -0800 |
commit | 4ae7a3efbc5a423ee288bd734545f834b3cd426b (patch) | |
tree | 3dadde375557913c20300769ca5ee4540a97ea93 /test | |
parent | d1d00636fc30baa3a904853f2231ebaa7e8e5df6 (diff) | |
download | psych-4ae7a3efbc5a423ee288bd734545f834b3cd426b.zip |
Make sexagesimal parsing more strict
Fixes #265
Diffstat (limited to 'test')
-rw-r--r-- | test/psych/test_scalar_scanner.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/psych/test_scalar_scanner.rb b/test/psych/test_scalar_scanner.rb index 9b6d8c1..e51fc69 100644 --- a/test/psych/test_scalar_scanner.rb +++ b/test/psych/test_scalar_scanner.rb @@ -88,6 +88,12 @@ module Psych assert_equal :foo, ss.tokenize(':foo') end + def test_scan_not_sexagesimal + assert_equal '00:00:00:00:0f', ss.tokenize('00:00:00:00:0f') + assert_equal '00:00:00:00:00', ss.tokenize('00:00:00:00:00') + assert_equal '00:00:00:00:00.0', ss.tokenize('00:00:00:00:00.0') + end + def test_scan_sexagesimal_float assert_equal 685230.15, ss.tokenize('190:20:30.15') end |