Skip to content

Commit

Permalink
add ut
Browse files Browse the repository at this point in the history
Signed-off-by: he1pa <18012015693@163.com>
  • Loading branch information
He1pa committed Nov 21, 2024
1 parent 15e2ef0 commit 04bb4f3
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 0 deletions.
8 changes: 8 additions & 0 deletions kclvm/tools/src/LSP/src/completion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2298,4 +2298,12 @@ mod tests {
23,
Some('.')
);

completion_label_without_builtin_func_test_snapshot!(
complete_unimport_schemas,
"src/test_data/completion_test/unimport/unimport/main.k",
1,
1,
None
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
source: tools/src/LSP/src/completion.rs
expression: "format! (\"{:?}\", got_labels)"
---
["HelloWorldSchema{}(import helloworld)", "Name{}(import pkg)", "SubPKg{}(import subpkg)"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[package]
name = "pkg"
edition = "v0.9.0"
version = "0.0.1"


Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
schema Name:
name: str
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[package]
name = "unimport"
edition = "v0.9.0"
version = "0.0.1"

[dependencies]
helloworld = "0.1.4"
pkg = { path = "../pkg" }
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
schema SubPKg:
name: str

0 comments on commit 04bb4f3

Please sign in to comment.