diff options
Diffstat (limited to 'test/psych/test_scalar_scanner.rb')
-rw-r--r-- | test/psych/test_scalar_scanner.rb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/test/psych/test_scalar_scanner.rb b/test/psych/test_scalar_scanner.rb index 25999892bc..e51fc69c4a 100644 --- a/test/psych/test_scalar_scanner.rb +++ b/test/psych/test_scalar_scanner.rb @@ -79,15 +79,21 @@ module Psych end def test_scan_null - assert_equal nil, ss.tokenize('null') - assert_equal nil, ss.tokenize('~') - assert_equal nil, ss.tokenize('') + assert_nil ss.tokenize('null') + assert_nil ss.tokenize('~') + assert_nil ss.tokenize('') end def test_scan_symbol 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 |