From c59da370a5d10ccecf3410a80b3d3af631e31df7 Mon Sep 17 00:00:00 2001 From: aycabta Date: Wed, 11 Aug 2021 14:08:39 +0900 Subject: Add comments about testing steps --- test/readline/test_readline.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'test/readline') diff --git a/test/readline/test_readline.rb b/test/readline/test_readline.rb index 0a8971320b..1ce0e3bb24 100644 --- a/test/readline/test_readline.rb +++ b/test/readline/test_readline.rb @@ -496,18 +496,20 @@ module BasetestReadline end } Readline.input = STDIN + # 0. Send SIGINT to this script. begin Thread.new{ trap(:INT) { - puts 'TRAP' + puts 'TRAP' # 2. Show 'TRAP' message. } - Readline.readline('input> ') + Readline.readline('input> ') # 1. Should keep working and call old trap. + # 4. Receive "\\n" and return because still working. }.value rescue Interrupt - puts 'FAILED' + puts 'FAILED' # 3. "Interrupt" shouldn't be raised because trapped. raise end - puts 'SUCCEEDED' + puts 'SUCCEEDED' # 5. Finish correctly. end; script = Tempfile.new("interrupt_in_other_thread") -- cgit v1.2.3