Skip to content

Commit 67dd56b

Browse files
committed
Correct Env name in the UI to be tested
1 parent 9f2332c commit 67dd56b

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

test/support/assertions.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
module DEBUGGER__
44
module AssertionHelpers
55
def assert_line_num(expected)
6-
case ENV['RUBY_DEBUG_TEST_UI']
6+
case get_target_ui
77
when 'terminal'
88
@scenario.push(Proc.new { |test_info|
99
msg = "Expected line number to be #{expected.inspect}, but was #{test_info.internal_info['line']}\n"

test/support/protocol_test_case.rb

+2-6
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def assert_watch_result expected, expression, frame_idx: 0
280280
# Not API
281281

282282
def execute_dap_scenario scenario
283-
ENV['RUBY_DEBUG_TESTED_UI'] = 'vscode'
283+
ENV['RUBY_DEBUG_TEST_UI'] = 'vscode'
284284

285285
@remote_info = setup_unix_domain_socket_remote_debuggee
286286
Timeout.timeout(TIMEOUT_SEC) do
@@ -305,7 +305,7 @@ def execute_dap_scenario scenario
305305
end
306306

307307
def execute_cdp_scenario scenario
308-
ENV['RUBY_DEBUG_TESTED_UI'] = 'chrome'
308+
ENV['RUBY_DEBUG_TEST_UI'] = 'chrome'
309309

310310
@remote_info = setup_tcpip_remote_debuggee
311311
Timeout.timeout(TIMEOUT_SEC) do
@@ -589,10 +589,6 @@ def find_response key, target, direction
589589
flunk create_protocol_message "TIMEOUT ERROR (#{TIMEOUT_SEC} sec) while waiting: #{key} #{target}"
590590
end
591591

592-
def get_target_ui
593-
ENV['RUBY_DEBUG_TESTED_UI']
594-
end
595-
596592
# FIXME: Commonalize this method.
597593
def recv_response
598594
case header = @sock.gets

test/support/test_case.rb

+4
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ def debug_print msg
9898

9999
TIMEOUT_SEC = (ENV['RUBY_DEBUG_TIMEOUT_SEC'] || 10).to_i
100100

101+
def get_target_ui
102+
ENV['RUBY_DEBUG_TEST_UI']
103+
end
104+
101105
private
102106

103107
def wait_pid pid, sec

0 commit comments

Comments
 (0)