11#!/usr/bin/env ruby 
2+ # encoding: utf-8 
23
34$:. unshift  File . join ( File . dirname ( __FILE__ ) ,  ".." ,  "lib" ) 
45
@@ -25,7 +26,7 @@ def test_variable_with_xml_content
2526      { :name  =>  "stringA" } , 
2627      { :name  =>  "testHashValue" } ) 
2728    # will receive '' 
28-     assert_equal ( "<start test=\" &\" />" ,  variables [ 0 ] . value ) 
29+     assert_equal ( CGI . escapeHTML ( "<start test=\" &\" />" ) ,  variables [ 0 ] . value ) 
2930    assert_local ( variables [ 0 ] ) 
3031    # the testHashValue contains an example, where the name consists of special 
3132    # characters 
@@ -99,10 +100,12 @@ def test_variable_local
99100  end 
100101
101102  def  test_variable_instance 
102-     create_socket  [ "require  'test2.rb'" ,  "custom_object=Test2.new" ,  "puts custom_object" ] 
103+     create_socket  [ "require_relative  'test2.rb'" ,  "custom_object=Test2.new" ,  "puts custom_object" ] 
103104    create_test2  [ "class Test2" ,  "def initialize" ,  "@y=5" ,  "end" ,  "def to_s" ,  "'test'" ,  "end" ,  "end" ] 
104105    run_to ( "test2.rb" ,  6 ) 
105-     send_ruby ( "frame 3; v i custom_object" ) 
106+     frame_number  =  3 
107+     frame_number  -= 1  if  Debugger ::FRONT_END  == "debase" 
108+     send_ruby ( "frame #{ frame_number }  ; v i custom_object" ) 
106109    assert_variables ( read_variables ,  1 , 
107110      { :name  =>  "@y" ,  :value  =>  "5" ,  :type  =>  "Fixnum" ,  :hasChildren  =>  false } ) 
108111    send_cont 
@@ -128,7 +131,7 @@ def test_variable_hash_with_string_keys
128131      { :name  =>  "hash" ,  :hasChildren  =>  true } ) 
129132    send_ruby ( "v i hash" ) 
130133    assert_variables ( read_variables ,  2 , 
131-       { :name  =>  "'a'" ,  :value  =>  "z" ,  :type  =>  "String" } ) 
134+       { :name  =>  CGI . escape_html ( "'a'" ) ,  :value  =>  "z" ,  :type  =>  "String" } ) 
132135    send_cont 
133136  end 
134137
0 commit comments