summaryrefslogtreecommitdiff
path: root/test/psych/test_scalar_scanner.rb
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-05 13:16:32 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-05 13:16:32 +0000
commit6d77e28763ed17f75edf3b4072701b4dbd7644bb (patch)
treee56f68d61222a1cf4bfc6a63aa640c6546a41b91 /test/psych/test_scalar_scanner.rb
parent4389ba641f89fe9d4e5c575442968d385c4183e8 (diff)
Import psych-3.0.0.beta1 from ruby/psych.
* Removed deprecated code. * Removed code related syck gem. * Fixed typos. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/psych/test_scalar_scanner.rb')
-rw-r--r--test/psych/test_scalar_scanner.rb12
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