diff options
author | Aaron Patterson <tenderlove@ruby-lang.org> | 2021-08-04 09:44:49 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-04 09:44:49 -0700 |
commit | 0179e0cf481018c83f711211bb0f15a1871fa335 (patch) | |
tree | a868e07d7e3dba0e67dc113b8d953275670aec11 /test | |
parent | 50fd106a657c4437f946cdd5044da39596f028ef (diff) | |
parent | 6e0e7a1e9f83b85615f82d26c5bf1a7d66844a3b (diff) | |
download | psych-0179e0cf481018c83f711211bb0f15a1871fa335.tar.gz |
Merge pull request #460 from tbrisker/floatscanner
Improve float scalar scanner
Diffstat (limited to 'test')
-rw-r--r-- | test/psych/test_scalar_scanner.rb | 12 |
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 |