File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,26 @@ def test_inspect_error_2
5858 send_cont
5959 end
6060
61+ def test_inspect_expr_with_timeout
62+ create_socket [ "require 'timeout'" , "puts 'test'" ]
63+ run_to_line ( 2 )
64+ send_ruby ( "v inspect (Timeout::timeout(10) { nil })" )
65+ variables = read_variables
66+ assert_equal ( 1 , variables . length , "There is one variable returned which is nil." )
67+ assert_equal ( nil , variables [ 0 ] . value )
68+ send_cont
69+ end
70+
71+ def test_inspect_failing_expr_with_timeout
72+ create_socket [ "require 'timeout'" , "puts 'test'" ]
73+ run_to_line ( 2 )
74+ send_ruby ( "v inspect (Timeout::timeout(0.1) { sleep 0.2 })" )
75+ variables = read_variables
76+ assert_equal ( 1 , variables . length , "There is one variable returned which is nil." )
77+ assert_equal ( "Timeout::Error" , variables [ 0 ] . type )
78+ send_cont
79+ end
80+
6181 def test_inspect_multiline_expression
6282 create_socket [ "sleep 0.1" ]
6383 run_to_line ( 1 )
You can’t perform that action at this time.
0 commit comments