diff options
author | dblack <dblack@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-03 12:54:13 +0000 |
---|---|---|
committer | dblack <dblack@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-03 12:54:13 +0000 |
commit | 9cab7d15ca791d0b14db03217485a7c756097a71 (patch) | |
tree | 36e2d3c91003a075b2b65a6240d6efa09f482394 /test/scanf/test_scanf.rb | |
parent | 6378201f8b202e493613d1c0936788ddbe708c76 (diff) |
* lib/scanf.rb: fixed bug involving matching literal '['
* test/scanf/test_scanf.rb: added test for scanf.rb fix
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/scanf/test_scanf.rb')
-rw-r--r-- | test/scanf/test_scanf.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/scanf/test_scanf.rb b/test/scanf/test_scanf.rb index fe4ac507b4..66ca629f54 100644 --- a/test/scanf/test_scanf.rb +++ b/test/scanf/test_scanf.rb @@ -276,6 +276,13 @@ def tests [ "%f", "+3.25", [3.25] ], [ "%f", "+3.25e2", [325.0] ], [ "%f", "3.z", [3.0] ], + +# Testing embedded matches including literal '[' behavior + [",%d,%f", ",10,1.1", [10,1.1] ], + [" ,%d,%f", " ,10,1.1", [10,1.1] ], + ["[%d,%f", "[10,1.1", [10,1.1] ], + [" [%d,%f", " [10,1.1", [10,1.1] ], + ] end end |