summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/psych/test_scalar_scanner.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/psych/test_scalar_scanner.rb b/test/psych/test_scalar_scanner.rb
index 2cd129e..cac8b8f 100644
--- a/test/psych/test_scalar_scanner.rb
+++ b/test/psych/test_scalar_scanner.rb
@@ -66,6 +66,10 @@ module Psych
assert_equal(1 / 0.0, ss.tokenize('.inf'))
end
+ def test_scan_plus_inf
+ assert_equal(1 / 0.0, ss.tokenize('+.inf'))
+ end
+
def test_scan_minus_inf
assert_equal(-1 / 0.0, ss.tokenize('-.inf'))
end
@@ -144,5 +148,13 @@ module Psych
assert_equal 0x123456789abcdef, ss.tokenize('0x_12_,34,_56,_789abcdef')
assert_equal 0x123456789abcdef, ss.tokenize('0x12_,34,_56,_789abcdef__')
end
+
+ def test_scan_dot
+ assert_equal '.', ss.tokenize('.')
+ end
+
+ def test_scan_plus_dot
+ assert_equal '+.', ss.tokenize('+.')
+ end
end
end