Skip to content

Commit

Permalink
Add an assertion for overwriting dialog proc with the same name
Browse files Browse the repository at this point in the history
  • Loading branch information
aycabta committed Dec 20, 2021
1 parent 9bf2ca6 commit 96067bc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/reline/test_reline.rb
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,11 @@ def test_add_dialog_proc
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)
Expand Down

0 comments on commit 96067bc

Please sign in to comment.