@@ -918,14 +918,14 @@ fn next_func() {
918918 fn test_find_function_end_single_quoted_string_with_brace ( ) {
919919 // BUG: single-quoted strings aren't tracked, so `'{'` is counted as a real brace
920920 let lines: Vec < & str > = vec ! [
921- "function foo() {" , // line 0: depth = 1
922- " let s = '{';" , // line 1: depth should stay 1, but goes to 2
923- " console.log(s);" , // line 2
924- "}" , // line 3: depth goes to 1 (not 0!), so foo "never ends"
925- "" , // line 4
926- "function bar() {" , // line 5: depth goes to 2
927- " return 1;" , // line 6
928- "}" , // line 7: depth goes to 1, and foo is "found" here (wrong!)
921+ "function foo() {" , // line 0: depth = 1
922+ " let s = '{';" , // line 1: depth should stay 1, but goes to 2
923+ " console.log(s);" , // line 2
924+ "}" , // line 3: depth goes to 1 (not 0!), so foo "never ends"
925+ "" , // line 4
926+ "function bar() {" , // line 5: depth goes to 2
927+ " return 1;" , // line 6
928+ "}" , // line 7: depth goes to 1, and foo is "found" here (wrong!)
929929 ] ;
930930 let end = find_function_end ( & lines, 0 , "js" ) ;
931931 assert_eq ! (
@@ -943,7 +943,7 @@ fn next_func() {
943943 " Self { name }" , // line 1
944944 "}" , // line 2
945945 "" ,
946- "fn other() {" , // line 4
946+ "fn other() {" , // line 4
947947 ] ;
948948 let end = find_function_end ( & lines, 0 , "rs" ) ;
949949 assert_eq ! (
0 commit comments