summaryrefslogtreecommitdiff
path: root/test/scanf
diff options
context:
space:
mode:
Diffstat (limited to 'test/scanf')
-rw-r--r--test/scanf/test_scanf.rb7
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