diff options
author | aycabta <aycabta@gmail.com> | 2021-08-11 14:08:39 +0900 |
---|---|---|
committer | aycabta <aycabta@gmail.com> | 2021-08-11 14:08:45 +0900 |
commit | c59da370a5d10ccecf3410a80b3d3af631e31df7 (patch) | |
tree | bf1386959cb3223821759d886d3ab55dea59e60f /test/readline | |
parent | 4f324514aa5b3dd598f31cf41602dd414e0fbaca (diff) |
Add comments about testing steps
Diffstat (limited to 'test/readline')
-rw-r--r-- | test/readline/test_readline.rb | 10 |
1 files changed, 6 insertions, 4 deletions
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") |