summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2019-11-28 15:15:41 +0900
committeraycabta <aycabta@gmail.com>2019-11-28 15:22:38 +0900
commit7d75e94ea967a47e1ca1083f6d1090eaac7ca58e (patch)
tree4b979aa5bf96422f36cecb24179b71aa2f46346d /test
parent8b4ee5d6ba92a385eedc9235ce0a2d5618deecf0 (diff)
Fix regexp to complete complex literal
IRB completion logic always needed exponential notation for complex literal such as 3e6i but it's bug. I fixed to support complex literal without exponential notation such as 3i.
Diffstat (limited to 'test')
-rw-r--r--test/irb/test_completion.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/irb/test_completion.rb b/test/irb/test_completion.rb
index 204b321ce1..7cfcbba7fe 100644
--- a/test/irb/test_completion.rb
+++ b/test/irb/test_completion.rb
@@ -19,5 +19,10 @@ module TestIRB
skip "cannot load irb/completion"
end
end
+
+ def test_complete_numeric
+ assert_include(IRB::InputCompletor.retrieve_completion_data("1r.positi", bind: binding), "1r.positive?")
+ assert_empty(IRB::InputCompletor.retrieve_completion_data("1i.positi", bind: binding))
+ end
end
end