summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2021-12-20 14:44:26 +0900
committergit <svn-admin@ruby-lang.org>2021-12-20 14:54:44 +0900
commitbb122811640db5ab307805f81cf6b5ccdd6a2f4d (patch)
treeac4f1a1dc9dbf62a483e5b99b52970b216fafeaf /test
parentcc072899a116198d4045a031c21110b61b5f6844 (diff)
downloadruby-bb122811640db5ab307805f81cf6b5ccdd6a2f4d.tar.gz
[ruby/reline] Add an assertion for overwriting dialog proc with the same name
https://github.com/ruby/reline/commit/96067bc13c
Diffstat (limited to 'test')
-rw-r--r--test/reline/test_reline.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/reline/test_reline.rb b/test/reline/test_reline.rb
index 1d016cf37f..a0ea43b2ad 100644
--- a/test/reline/test_reline.rb
+++ b/test/reline/test_reline.rb
@@ -316,6 +316,11 @@ class Reline::Test < Reline::TestCase
d = Reline.dialog_proc(:test_proc)
assert_equal(dummy_proc, d.dialog_proc)
+ dummy_proc_2 = proc {}
+ Reline.add_dialog_proc(:test_proc, dummy_proc_2)
+ d = Reline.dialog_proc(:test_proc)
+ assert_equal(dummy_proc_2, d.dialog_proc)
+
l = lambda {}
Reline.add_dialog_proc(:test_lambda, l)
d = Reline.dialog_proc(:test_lambda)