diff --git a/kclvm/tools/src/LSP/src/goto_def.rs b/kclvm/tools/src/LSP/src/goto_def.rs index 97323813c..11120ab5c 100644 --- a/kclvm/tools/src/LSP/src/goto_def.rs +++ b/kclvm/tools/src/LSP/src/goto_def.rs @@ -242,21 +242,21 @@ mod tests { goto_def_test_snapshot!( goto_local_var_def_test1, - "src/test_data/goto_def_test/goto_local_var_def/goto_local_var_def.k", + "src/test_data/goto_def_test/goto_local_var_def_test/goto_local_var_def_test.k", 7, 11 ); goto_def_test_snapshot!( goto_local_var_def_test2, - "src/test_data/goto_def_test/goto_local_var_def/goto_local_var_def.k", + "src/test_data/goto_def_test/goto_local_var_def_test/goto_local_var_def_test.k", 9, 11 ); goto_def_test_snapshot!( goto_local_var_def_test3, - "src/test_data/goto_def_test/goto_local_var_def/goto_local_var_def.k", + "src/test_data/goto_def_test/goto_local_var_def_test/goto_local_var_def_test.k", 11, 11 ); diff --git a/kclvm/tools/src/LSP/src/snapshots/kcl_language_server__goto_def__tests__goto_local_var_def_test1.snap b/kclvm/tools/src/LSP/src/snapshots/kcl_language_server__goto_def__tests__goto_local_var_def_test1.snap new file mode 100644 index 000000000..0b5930b7e --- /dev/null +++ b/kclvm/tools/src/LSP/src/snapshots/kcl_language_server__goto_def__tests__goto_local_var_def_test1.snap @@ -0,0 +1,5 @@ +--- +source: tools/src/LSP/src/goto_def.rs +expression: "format!(\"{:?}\",\n {\n let (file, _program, _, gs) =\n compile_test_file(\"src/test_data/goto_def_test/goto_local_var_def_test/goto_local_var_def_test.k\");\n let pos = KCLPos\n { filename : file.clone(), line : 7, column : Some(11), }; let res =\n goto_def(& pos, & gs); fmt_resp(& res)\n })" +--- +"path: \"src/test_data/goto_def_test/goto_local_var_def_test/goto_local_var_def_test.k\", range: Range { start: Position { line: 4, character: 4 }, end: Position { line: 4, character: 9 } }" diff --git a/kclvm/tools/src/LSP/src/snapshots/kcl_language_server__goto_def__tests__goto_local_var_def_test2.snap b/kclvm/tools/src/LSP/src/snapshots/kcl_language_server__goto_def__tests__goto_local_var_def_test2.snap new file mode 100644 index 000000000..99fe6b949 --- /dev/null +++ b/kclvm/tools/src/LSP/src/snapshots/kcl_language_server__goto_def__tests__goto_local_var_def_test2.snap @@ -0,0 +1,5 @@ +--- +source: tools/src/LSP/src/goto_def.rs +expression: "format!(\"{:?}\",\n {\n let (file, _program, _, gs) =\n compile_test_file(\"src/test_data/goto_def_test/goto_local_var_def_test/goto_local_var_def_test.k\");\n let pos = KCLPos\n { filename : file.clone(), line : 9, column : Some(11), }; let res =\n goto_def(& pos, & gs); fmt_resp(& res)\n })" +--- +"path: \"src/test_data/goto_def_test/goto_local_var_def_test/goto_local_var_def_test.k\", range: Range { start: Position { line: 4, character: 4 }, end: Position { line: 4, character: 9 } }" diff --git a/kclvm/tools/src/LSP/src/snapshots/kcl_language_server__goto_def__tests__goto_local_var_def_test3.snap b/kclvm/tools/src/LSP/src/snapshots/kcl_language_server__goto_def__tests__goto_local_var_def_test3.snap new file mode 100644 index 000000000..752c4ef3e --- /dev/null +++ b/kclvm/tools/src/LSP/src/snapshots/kcl_language_server__goto_def__tests__goto_local_var_def_test3.snap @@ -0,0 +1,5 @@ +--- +source: tools/src/LSP/src/goto_def.rs +expression: "format!(\"{:?}\",\n {\n let (file, _program, _, gs) =\n compile_test_file(\"src/test_data/goto_def_test/goto_local_var_def_test/goto_local_var_def_test.k\");\n let pos = KCLPos\n { filename : file.clone(), line : 11, column : Some(11), }; let res =\n goto_def(& pos, & gs); fmt_resp(& res)\n })" +--- +"path: \"src/test_data/goto_def_test/goto_local_var_def_test/goto_local_var_def_test.k\", range: Range { start: Position { line: 4, character: 4 }, end: Position { line: 4, character: 9 } }" diff --git a/kclvm/tools/src/LSP/src/test_data/goto_def_test/goto_local_var_def_test/goto_local_car_def_test.k b/kclvm/tools/src/LSP/src/test_data/goto_def_test/goto_local_var_def_test/goto_local_var_def_test.k similarity index 100% rename from kclvm/tools/src/LSP/src/test_data/goto_def_test/goto_local_var_def_test/goto_local_car_def_test.k rename to kclvm/tools/src/LSP/src/test_data/goto_def_test/goto_local_var_def_test/goto_local_var_def_test.k