Skip to content

Commit

Permalink
test: update snapshots in legacy format (#873)
Browse files Browse the repository at this point in the history
  • Loading branch information
Myriad-Dreamin authored Nov 21, 2024
1 parent a13c8e4 commit 1ba6b6c
Show file tree
Hide file tree
Showing 112 changed files with 167 additions and 75 deletions.
16 changes: 8 additions & 8 deletions crates/tinymist-query/src/docs/tidy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ See @@show-module() for outputting the results of this function.
in all function and parameter descriptions.<!-- typlite:end:list-item 0 -->
- <!-- typlite:begin:list-item 0 -->preamble (string): Code to prepend to all code snippets shown with `#example()`.
This can for instance be used to import something from the scope.<!-- typlite:end:list-item 0 -->
-> string"###), @r###"
-> string"###), @r"
>> docs:
These again are dictionaries with the keys
- <!-- typlite:begin:list-item 0 -->`description` (optional): The description for the argument.<!-- typlite:end:list-item 0 -->
Expand Down Expand Up @@ -250,7 +250,7 @@ See @@show-module() for outputting the results of this function.
Code to prepend to all code snippets shown with `#example()`.
This can for instance be used to import something from the scope.
<< arg
"###);
");
}

#[test]
Expand All @@ -265,7 +265,7 @@ See @@show-module() for outputting the results of this function.
references. If `auto`, the label-prefix name will be the module name.
- <!-- typlite:begin:list-item 1 -->nested something<!-- typlite:end:list-item 1 -->
- <!-- typlite:begin:list-item 1 -->nested something 2<!-- typlite:end:list-item 1 --><!-- typlite:end:list-item 0 -->
-> string"###), @r###"
-> string"###), @r"
>> docs:
These again are dictionaries with the keys
- <!-- typlite:begin:list-item 0 -->`description` (optional): The description for the argument.<!-- typlite:end:list-item 0 -->
Expand All @@ -284,34 +284,34 @@ See @@show-module() for outputting the results of this function.
- <!-- typlite:begin:list-item 1 -->nested something<!-- typlite:end:list-item 1 -->
- <!-- typlite:begin:list-item 1 -->nested something 2<!-- typlite:end:list-item 1 -->
<< arg
"###);
");
}

#[test]
fn test_identify_tidy_docs3() {
insta::assert_snapshot!(var(r###"See @@show-module() for outputting the results of this function.
-> string"###), @r###"
-> string"###), @r"
>> docs:
See @@show-module() for outputting the results of this function.
<< docs
>>return
string
<<return
"###);
");
}

#[test]
fn test_identify_tidy_docs4() {
insta::assert_snapshot!(var(r###"
- <!-- typlite:begin:list-item 0 -->name (string): The name for the module.<!-- typlite:end:list-item 0 -->
-> string"###), @r###"
-> string"###), @r"
>> docs:
- <!-- typlite:begin:list-item 0 -->name (string): The name for the module.<!-- typlite:end:list-item 0 -->
<< docs
>>return
string
<<return
"###);
");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ source: crates/tinymist-query/src/completion.rs
description: Completion on c( (99..101)
expression: "JsonRepr::new_pure(results)"
input_file: crates/tinymist-query/src/fixtures/completion/base.typ
snapshot_kind: text
---
[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ source: crates/tinymist-query/src/completion.rs
description: "Completion on ] (29..30)"
expression: "JsonRepr::new_pure(results)"
input_file: crates/tinymist-query/src/fixtures/completion/bracket_plain.typ
snapshot_kind: text
---
[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ source: crates/tinymist-query/src/completion.rs
description: Completion on t (63..64)
expression: "JsonRepr::new_pure(results)"
input_file: crates/tinymist-query/src/fixtures/completion/bracket_strong.typ
snapshot_kind: text
---
[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ source: crates/tinymist-query/src/completion.rs
description: "Completion on ] (52..53)"
expression: "JsonRepr::new_pure(results)"
input_file: crates/tinymist-query/src/fixtures/completion/bracket_strong_delta.typ
snapshot_kind: text
---
[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ source: crates/tinymist-query/src/completion.rs
description: "Completion on ] (52..53)"
expression: "JsonRepr::new_pure(results)"
input_file: crates/tinymist-query/src/fixtures/completion/bracket_strong_delta2.typ
snapshot_kind: text
---
[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ source: crates/tinymist-query/src/completion.rs
description: Completion on > (260..261)
expression: "JsonRepr::new_pure(results)"
input_file: crates/tinymist-query/src/fixtures/completion/bug_cite_function_infer.typ
snapshot_kind: text
---
[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ source: crates/tinymist-query/src/completion.rs
description: Completion on > (275..276)
expression: "JsonRepr::new_pure(results)"
input_file: crates/tinymist-query/src/fixtures/completion/bug_cite_function_infer2.typ
snapshot_kind: text
---
[
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
source: crates/tinymist-query/src/completion.rs
description: Completion on (107..108)
description: Completion on (108..109)
expression: "JsonRepr::new_pure(results)"
input_file: crates/tinymist-query/src/fixtures/completion/bug_mix_context_type.typ
snapshot_kind: text
---
[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ source: crates/tinymist-query/src/completion.rs
description: Completion on t (135..136)
expression: "JsonRepr::new_pure(results)"
input_file: crates/tinymist-query/src/fixtures/completion/cite_heading.typ
snapshot_kind: text
---
[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ source: crates/tinymist-query/src/completion.rs
description: Completion on (23..24)
expression: "JsonRepr::new_pure(results)"
input_file: crates/tinymist-query/src/fixtures/completion/colon_markup.typ
snapshot_kind: text
---
[
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
source: crates/tinymist-query/src/completion.rs
description: Completion on (46..47)
description: Completion on (48..49)
expression: "JsonRepr::new_pure(results)"
input_file: crates/tinymist-query/src/fixtures/completion/colon_markup2.typ
snapshot_kind: text
---
[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ source: crates/tinymist-query/src/completion.rs
description: Completion on (23..24)
expression: "JsonRepr::new_pure(results)"
input_file: crates/tinymist-query/src/fixtures/completion/colon_math.typ
snapshot_kind: text
---
[
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
source: crates/tinymist-query/src/completion.rs
description: Completion on (46..47)
description: Completion on (48..49)
expression: "JsonRepr::new_pure(results)"
input_file: crates/tinymist-query/src/fixtures/completion/colon_math2.typ
snapshot_kind: text
---
[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ source: crates/tinymist-query/src/completion.rs
description: Completion on (65..66)
expression: "JsonRepr::new_pure(results)"
input_file: crates/tinymist-query/src/fixtures/completion/colon_param.typ
snapshot_kind: text
---
[
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
source: crates/tinymist-query/src/completion.rs
description: Completion on t (100..101)
description: Completion on t (103..104)
expression: "JsonRepr::new_pure(results)"
input_file: crates/tinymist-query/src/fixtures/completion/complete_purely_label.typ
snapshot_kind: text
---
[
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
source: crates/tinymist-query/src/completion.rs
description: Completion on t (99..100)
description: Completion on t (102..103)
expression: "JsonRepr::new_pure(results)"
input_file: crates/tinymist-query/src/fixtures/completion/complete_purely_ref.typ
snapshot_kind: text
---
[
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
source: crates/tinymist-query/src/completion.rs
description: Completion on @R (132..134)
description: Completion on @R (135..137)
expression: "JsonRepr::new_pure(results)"
input_file: crates/tinymist-query/src/fixtures/completion/completion_title.typ
snapshot_kind: text
---
[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ source: crates/tinymist-query/src/completion.rs
description: Completion on 9 (109..110)
expression: "JsonRepr::new_pure(results)"
input_file: crates/tinymist-query/src/fixtures/completion/completion_title2.typ
snapshot_kind: text
---
[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ source: crates/tinymist-query/src/completion.rs
description: Completion on ) (139..140)
expression: "JsonRepr::new_pure(results)"
input_file: crates/tinymist-query/src/fixtures/completion/completion_title3.typ
snapshot_kind: text
---
[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ source: crates/tinymist-query/src/completion.rs
description: Completion on / (37..38)
expression: "JsonRepr::new_pure(results)"
input_file: crates/tinymist-query/src/fixtures/completion/element_where.typ
snapshot_kind: text
---
[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ source: crates/tinymist-query/src/completion.rs
description: Completion on (93..94)
expression: "JsonRepr::new_pure(results)"
input_file: crates/tinymist-query/src/fixtures/completion/fp_dict_filter.typ
snapshot_kind: text
---
[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ source: crates/tinymist-query/src/completion.rs
description: Completion on / (349..350)
expression: "JsonRepr::new_pure(results)"
input_file: crates/tinymist-query/src/fixtures/completion/func_args.typ
snapshot_kind: text
---
[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ source: crates/tinymist-query/src/completion.rs
description: Completion on / (361..362)
expression: "JsonRepr::new_pure(results)"
input_file: crates/tinymist-query/src/fixtures/completion/func_args2.typ
snapshot_kind: text
---
[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ source: crates/tinymist-query/src/completion.rs
description: Completion on u (372..373)
expression: "JsonRepr::new_pure(results)"
input_file: crates/tinymist-query/src/fixtures/completion/func_args_after.typ
snapshot_kind: text
---
[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ source: crates/tinymist-query/src/completion.rs
description: Completion on / (30..31)
expression: "JsonRepr::new_pure(results)"
input_file: crates/tinymist-query/src/fixtures/completion/func_builtin_args.typ
snapshot_kind: text
---
[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ source: crates/tinymist-query/src/completion.rs
description: Completion on c( (63..65)
expression: "JsonRepr::new_pure(results)"
input_file: crates/tinymist-query/src/fixtures/completion/func_params.typ
snapshot_kind: text
---
[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ source: crates/tinymist-query/src/completion.rs
description: Completion on / (354..355)
expression: "JsonRepr::new_pure(results)"
input_file: crates/tinymist-query/src/fixtures/completion/func_with_args.typ
snapshot_kind: text
---
[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ source: crates/tinymist-query/src/completion.rs
description: Completion on o (31..33)
expression: "JsonRepr::new_pure(results)"
input_file: crates/tinymist-query/src/fixtures/completion/half_completion.typ
snapshot_kind: text
---
[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ source: crates/tinymist-query/src/completion.rs
description: Completion on c( (84..86)
expression: "JsonRepr::new_pure(results)"
input_file: crates/tinymist-query/src/fixtures/completion/import.typ
snapshot_kind: text
---
[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ source: crates/tinymist-query/src/completion.rs
description: Completion on c( (74..76)
expression: "JsonRepr::new_pure(results)"
input_file: crates/tinymist-query/src/fixtures/completion/import_self.typ
snapshot_kind: text
---
[
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
source: crates/tinymist-query/src/completion.rs
description: Completion on c( (76..78)
description: Completion on c( (77..79)
expression: "JsonRepr::new_pure(results)"
input_file: crates/tinymist-query/src/fixtures/completion/import_self2.typ
snapshot_kind: text
---
[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ source: crates/tinymist-query/src/completion.rs
description: Completion on c( (85..87)
expression: "JsonRepr::new_pure(results)"
input_file: crates/tinymist-query/src/fixtures/completion/import_self3.typ
snapshot_kind: text
---
[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ source: crates/tinymist-query/src/completion.rs
description: Completion on c( (88..90)
expression: "JsonRepr::new_pure(results)"
input_file: crates/tinymist-query/src/fixtures/completion/import_self4.typ
snapshot_kind: text
---
[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ source: crates/tinymist-query/src/completion.rs
description: Completion on c( (77..79)
expression: "JsonRepr::new_pure(results)"
input_file: crates/tinymist-query/src/fixtures/completion/import_star.typ
snapshot_kind: text
---
[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ source: crates/tinymist-query/src/completion.rs
description: Completion on c( (70..72)
expression: "JsonRepr::new_pure(results)"
input_file: crates/tinymist-query/src/fixtures/completion/item_shadow.typ
snapshot_kind: text
---
[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ source: crates/tinymist-query/src/completion.rs
description: Completion on n (32..33)
expression: "JsonRepr::new_pure(results)"
input_file: crates/tinymist-query/src/fixtures/completion/keyword_ident.typ
snapshot_kind: text
---
[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ source: crates/tinymist-query/src/completion.rs
description: Completion on (61..62)
expression: "JsonRepr::new_pure(results)"
input_file: crates/tinymist-query/src/fixtures/completion/let-context.typ
snapshot_kind: text
---
[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ source: crates/tinymist-query/src/completion.rs
description: Completion on c( (95..97)
expression: "JsonRepr::new_pure(results)"
input_file: crates/tinymist-query/src/fixtures/completion/let.typ
snapshot_kind: text
---
[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ source: crates/tinymist-query/src/completion.rs
description: Completion on / (33..34)
expression: "JsonRepr::new_pure(results)"
input_file: crates/tinymist-query/src/fixtures/completion/math_bold.typ
snapshot_kind: text
---
[
{
Expand Down
Loading

0 comments on commit 1ba6b6c

Please sign in to comment.