Skip to content

Commit

Permalink
feat: add snapshot tests for completion functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
SkySingh04 committed Dec 24, 2024
1 parent e80afba commit 07a6b26
Show file tree
Hide file tree
Showing 38 changed files with 808 additions and 1,888 deletions.
2,474 changes: 586 additions & 1,888 deletions kclvm/tools/src/LSP/src/completion.rs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tools/src/LSP/src/completion.rs
assertion_line: 1237
expression: "format! (\"{:?}\", got_labels)"
---
[" True"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tools/src/LSP/src/completion.rs
assertion_line: 1245
expression: "format! (\"{:?}\", got_labels)"
---
[" {}"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tools/src/LSP/src/completion.rs
assertion_line: 1229
expression: "format! (\"{:?}\", got_labels)"
---
[" 1"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tools/src/LSP/src/completion.rs
assertion_line: 1221
expression: "format! (\"{:?}\", got_labels)"
---
[" []"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tools/src/LSP/src/completion.rs
assertion_line: 1253
expression: "format! (\"{:?}\", got_labels)"
---
[" sub.Person1{}"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tools/src/LSP/src/completion.rs
assertion_line: 1213
expression: "format! (\"{:?}\", got_labels)"
---
[" \"abc\"", " \"def\""]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tools/src/LSP/src/completion.rs
assertion_line: 1205
expression: "format! (\"{:?}\", got_labels)"
---
[" False", " True"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tools/src/LSP/src/completion.rs
assertion_line: 1189
expression: "format! (\"{:?}\", got_labels)"
---
["age", "name"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tools/src/LSP/src/completion.rs
assertion_line: 1357
expression: "format! (\"{:?}\", got_labels)"
---
["Person", "Person{}", "name"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tools/src/LSP/src/completion.rs
assertion_line: 1333
expression: "format! (\"{:?}\", got_labels)"
---
[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tools/src/LSP/src/completion.rs
assertion_line: 1109
expression: "format! (\"{:?}\", got_labels)"
---
["age", "name"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tools/src/LSP/src/completion.rs
assertion_line: 1117
expression: "format! (\"{:?}\", got_labels)"
---
["capitalize(…)", "count(…)", "endswith(…)", "find(…)", "format(…)", "index(…)", "isalnum(…)", "isalpha(…)", "isdigit(…)", "islower(…)", "isspace(…)", "istitle(…)", "isupper(…)", "join(…)", "lower(…)", "lstrip(…)", "removeprefix(…)", "removesuffix(…)", "replace(…)", "rfind(…)", "rindex(…)", "rsplit(…)", "rstrip(…)", "split(…)", "splitlines(…)", "startswith(…)", "strip(…)", "title(…)", "upper(…)"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tools/src/LSP/src/completion.rs
assertion_line: 1197
expression: "format! (\"{:?}\", got_labels)"
---
["base64", "collection", "crypto", "datetime", "file", "json", "manifests", "math", "net", "regex", "runtime", "template", "units", "yaml"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tools/src/LSP/src/completion.rs
assertion_line: 1125
expression: "format! (\"{:?}\", got_labels)"
---
["file1", "file2", "subpkg"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tools/src/LSP/src/completion.rs
assertion_line: 1133
expression: "format! (\"{:?}\", got_labels)"
---
["Person1"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tools/src/LSP/src/completion.rs
assertion_line: 1365
expression: "format! (\"{:?}\", got_labels)"
---
[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tools/src/LSP/src/completion.rs
assertion_line: 1373
expression: "format! (\"{:?}\", got_labels)"
---
[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tools/src/LSP/src/completion.rs
assertion_line: 1149
expression: "format! (\"{:?}\", got_labels)"
---
["capitalize(…)", "count(…)", "endswith(…)", "find(…)", "format(…)", "index(…)", "isalnum(…)", "isalpha(…)", "isdigit(…)", "islower(…)", "isspace(…)", "istitle(…)", "isupper(…)", "join(…)", "lower(…)", "lstrip(…)", "removeprefix(…)", "removesuffix(…)", "replace(…)", "rfind(…)", "rindex(…)", "rsplit(…)", "rstrip(…)", "split(…)", "splitlines(…)", "startswith(…)", "strip(…)", "title(…)", "upper(…)"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tools/src/LSP/src/completion.rs
assertion_line: 1141
expression: "format! (\"{:?}\", got_labels)"
---
["ceil(…)", "exp(…)", "expm1(…)", "factorial(…)", "floor(…)", "gcd(…)", "isfinite(…)", "isinf(…)", "isnan(…)", "log(…)", "log10(…)", "log1p(…)", "log2(…)", "modf(…)", "pow(…)", "sqrt(…)"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tools/src/LSP/src/completion.rs
assertion_line: 1341
expression: "format! (\"{:?}\", got_labels)"
---
["cpu", "memory"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tools/src/LSP/src/completion.rs
assertion_line: 1101
expression: "format! (\"{:?}\", got_labels)"
---
["", "age", "math", "name", "subpkg"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tools/src/LSP/src/completion.rs
assertion_line: 1269
expression: "format! (\"{:?}\", got_labels)"
---
["\n\nAttributes\n----------\nname: \nworkloadType: \nreplica: \n\nExamples\n--------\n"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tools/src/LSP/src/completion.rs
assertion_line: 1325
expression: "format! (\"{:?}\", got_labels)"
---
["Params", "Params{}", "max", "min"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tools/src/LSP/src/completion.rs
assertion_line: 1261
expression: "format! (\"{:?}\", got_labels)"
---
["Base", "Base{}", "Config", "Config{}", "Name", "Name{}", "Person", "Person(b){}", "abs(…)", "all_true(…)", "any_true(…)", "bin(…)", "bool(…)", "dict(…)", "float(…)", "hex(…)", "int(…)", "isnullish(…)", "isunique(…)", "len(…)", "list(…)", "max(…)", "min(…)", "multiplyof(…)", "n", "oct(…)", "option(…)", "ord(…)", "p", "pow(…)", "print(…)", "range(…)", "round(…)", "sorted(…)", "str(…)", "sum(…)", "typeof(…)", "zip(…)"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tools/src/LSP/src/completion.rs
assertion_line: 1317
expression: "format! (\"{:?}\", got_labels)"
---
["name"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tools/src/LSP/src/completion.rs
assertion_line: 1381
expression: "format! (\"{:?}\", got_labels)"
---
["name"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tools/src/LSP/src/completion.rs
assertion_line: 1389
expression: "format! (\"{:?}\", got_labels)"
---
["name"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tools/src/LSP/src/completion.rs
assertion_line: 1157
expression: "format! (\"{:?}\", got_labels)"
---
["a"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tools/src/LSP/src/completion.rs
assertion_line: 1277
expression: "format! (\"{:?}\", got_labels)"
---
["capitalize(…)", "count(…)", "endswith(…)", "find(…)", "format(…)", "index(…)", "isalnum(…)", "isalpha(…)", "isdigit(…)", "islower(…)", "isspace(…)", "istitle(…)", "isupper(…)", "join(…)", "lower(…)", "lstrip(…)", "removeprefix(…)", "removesuffix(…)", "replace(…)", "rfind(…)", "rindex(…)", "rsplit(…)", "rstrip(…)", "split(…)", "splitlines(…)", "startswith(…)", "strip(…)", "title(…)", "upper(…)"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tools/src/LSP/src/completion.rs
assertion_line: 1293
expression: "format! (\"{:?}\", got_labels)"
---
[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tools/src/LSP/src/completion.rs
assertion_line: 1301
expression: "format! (\"{:?}\", got_labels)"
---
[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tools/src/LSP/src/completion.rs
assertion_line: 1285
expression: "format! (\"{:?}\", got_labels)"
---
["capitalize(…)", "count(…)", "endswith(…)", "find(…)", "format(…)", "index(…)", "isalnum(…)", "isalpha(…)", "isdigit(…)", "islower(…)", "isspace(…)", "istitle(…)", "isupper(…)", "join(…)", "lower(…)", "lstrip(…)", "removeprefix(…)", "removesuffix(…)", "replace(…)", "rfind(…)", "rindex(…)", "rsplit(…)", "rstrip(…)", "split(…)", "splitlines(…)", "startswith(…)", "strip(…)", "title(…)", "upper(…)"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tools/src/LSP/src/completion.rs
assertion_line: 1309
expression: "format! (\"{:?}\", got_labels)"
---
["capitalize(…)", "count(…)", "endswith(…)", "find(…)", "format(…)", "index(…)", "isalnum(…)", "isalpha(…)", "isdigit(…)", "islower(…)", "isspace(…)", "istitle(…)", "isupper(…)", "join(…)", "lower(…)", "lstrip(…)", "removeprefix(…)", "removesuffix(…)", "replace(…)", "rfind(…)", "rindex(…)", "rsplit(…)", "rstrip(…)", "split(…)", "splitlines(…)", "startswith(…)", "strip(…)", "title(…)", "upper(…)"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tools/src/LSP/src/completion.rs
assertion_line: 1165
expression: "format! (\"{:?}\", got_labels)"
---
["capitalize(…)", "count(…)", "endswith(…)", "find(…)", "format(…)", "index(…)", "isalnum(…)", "isalpha(…)", "isdigit(…)", "islower(…)", "isspace(…)", "istitle(…)", "isupper(…)", "join(…)", "lower(…)", "lstrip(…)", "removeprefix(…)", "removesuffix(…)", "replace(…)", "rfind(…)", "rindex(…)", "rsplit(…)", "rstrip(…)", "split(…)", "splitlines(…)", "startswith(…)", "strip(…)", "title(…)", "upper(…)"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tools/src/LSP/src/completion.rs
assertion_line: 1181
expression: "format! (\"{:?}\", got_labels)"
---
["capitalize(…)", "count(…)", "endswith(…)", "find(…)", "format(…)", "index(…)", "isalnum(…)", "isalpha(…)", "isdigit(…)", "islower(…)", "isspace(…)", "istitle(…)", "isupper(…)", "join(…)", "lower(…)", "lstrip(…)", "removeprefix(…)", "removesuffix(…)", "replace(…)", "rfind(…)", "rindex(…)", "rsplit(…)", "rstrip(…)", "split(…)", "splitlines(…)", "startswith(…)", "strip(…)", "title(…)", "upper(…)"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tools/src/LSP/src/completion.rs
assertion_line: 1093
expression: "format! (\"{:?}\", got_labels)"
---
["", "Config", "Config{}", "P", "Person", "Person1{}", "Person{}", "P{}", "aaaa", "math", "n", "p", "p1", "p2", "p3", "p4", "subpkg"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tools/src/LSP/src/completion.rs
assertion_line: 1173
expression: "format! (\"{:?}\", got_labels)"
---
["Config", "Config{}", "P", "Person", "Person1{}", "Person{}", "P{}", "aaaa", "math", "n", "p", "p1", "p2", "p3", "p4", "pkg", "subpkg"]

0 comments on commit 07a6b26

Please sign in to comment.