@@ -68,24 +68,31 @@ def test_inspect_multiline_expression
6868 send_cont
6969 end
7070
71- def test_inspect_escaping_escaped_newlines
71+ def test_inspect_unescaping_escaped_newlines
7272 create_socket [ "sleep 0.1" ]
7373 run_to_line ( 1 )
7474
7575 send_ruby ( 'v inspect "\\\\n".size' )
76- variable = read_variables
76+ variables = read_variables
7777 assert_equal ( 1 , variables . length , "There is one variable returned." )
78- assert_equal ( 1 , variables [ 0 ] . value , "There is one char (newline)" )
78+ assert_equal ( "1" , variables [ 0 ] . value , "There is one char (newline)" )
7979
8080 send_ruby ( 'v inspect "\\\\\\n".size' )
81- variable = read_variables
81+ variables = read_variables
8282 assert_equal ( 1 , variables . length , "There is one variable returned." )
83- assert_equal ( 0 , variables [ 0 ] . value , "There are no chars, it's line continuation here" )
83+ assert_equal ( "0" , variables [ 0 ] . value , "There are no chars, it's line continuation here" )
8484
8585 send_ruby ( 'v inspect "\\\\\\\\\\n".size' )
86- variable = read_variables
86+ variables = read_variables
87+ assert_equal ( 1 , variables . length , "There is one variable returned." )
88+ assert_equal ( "2" , variables [ 0 ] . value , "There are two chars: escaped backslash and newline" )
89+
90+ send_ruby ( 'v inspect \'"\\\\n\'.size' )
91+ variables = read_variables
8792 assert_equal ( 1 , variables . length , "There is one variable returned." )
88- assert_equal ( 2 , variables [ 0 ] . value , "There are two chars: escaped backslash and newline" )
93+ assert_equal ( "3" , variables [ 0 ] . value , "There are three chars: quote, backslash and n" )
94+
95+ send_cont
8996 end
9097
9198end
0 commit comments