mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-08-02 01:12:16 +00:00
test: add more tests about completing in middle of strings/labels (#1052)
This commit is contained in:
parent
8a88b50cb1
commit
b7f44e882a
6 changed files with 117 additions and 0 deletions
|
@ -0,0 +1,7 @@
|
|||
|
||||
/// path: base.typ
|
||||
#let aa() = 1;
|
||||
|
||||
-----
|
||||
#import "ba"/* range -1..0 */
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
|
||||
/// path: base.typ
|
||||
#let aa() = 1;
|
||||
|
||||
-----
|
||||
#read(""/* range -1..0 */)
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
|
||||
/// path: base.typ
|
||||
#let aa() = 1;
|
||||
|
||||
-----
|
||||
#read("ba"/* range -1..0 */)
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
---
|
||||
source: crates/tinymist-query/src/completion.rs
|
||||
description: "Completion on \" (11..12)"
|
||||
expression: "JsonRepr::new_pure(results)"
|
||||
input_file: crates/tinymist-query/src/fixtures/completion/import_rel_path_middle.typ
|
||||
snapshot_kind: text
|
||||
---
|
||||
[
|
||||
{
|
||||
"isIncomplete": false,
|
||||
"items": [
|
||||
{
|
||||
"kind": 17,
|
||||
"label": "base.typ",
|
||||
"sortText": "0",
|
||||
"textEdit": {
|
||||
"newText": "base.typ",
|
||||
"range": {
|
||||
"end": {
|
||||
"character": 11,
|
||||
"line": 0
|
||||
},
|
||||
"start": {
|
||||
"character": 9,
|
||||
"line": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
|
@ -0,0 +1,32 @@
|
|||
---
|
||||
source: crates/tinymist-query/src/completion.rs
|
||||
description: "Completion on \" (7..8)"
|
||||
expression: "JsonRepr::new_pure(results)"
|
||||
input_file: crates/tinymist-query/src/fixtures/completion/read_path.typ
|
||||
snapshot_kind: text
|
||||
---
|
||||
[
|
||||
{
|
||||
"isIncomplete": false,
|
||||
"items": [
|
||||
{
|
||||
"kind": 17,
|
||||
"label": "base.typ",
|
||||
"sortText": "000",
|
||||
"textEdit": {
|
||||
"newText": "base.typ",
|
||||
"range": {
|
||||
"end": {
|
||||
"character": 7,
|
||||
"line": 0
|
||||
},
|
||||
"start": {
|
||||
"character": 7,
|
||||
"line": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
|
@ -0,0 +1,32 @@
|
|||
---
|
||||
source: crates/tinymist-query/src/completion.rs
|
||||
description: "Completion on \" (9..10)"
|
||||
expression: "JsonRepr::new_pure(results)"
|
||||
input_file: crates/tinymist-query/src/fixtures/completion/read_path_middle.typ
|
||||
snapshot_kind: text
|
||||
---
|
||||
[
|
||||
{
|
||||
"isIncomplete": false,
|
||||
"items": [
|
||||
{
|
||||
"kind": 17,
|
||||
"label": "base.typ",
|
||||
"sortText": "000",
|
||||
"textEdit": {
|
||||
"newText": "base.typ",
|
||||
"range": {
|
||||
"end": {
|
||||
"character": 9,
|
||||
"line": 0
|
||||
},
|
||||
"start": {
|
||||
"character": 7,
|
||||
"line": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue