Skip to content

Commit

Permalink
add various suggestion tests
Browse files Browse the repository at this point in the history
  • Loading branch information
haya14busa committed Jul 25, 2020
1 parent 4b48cc0 commit 180302f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions _testdata/suggestions.json
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
{"message":"suggestion test","location":{"path":"_testdata/suggestions.txt","range":{"start":{"line":3}}}, "suggestions": [{"range":{"start":{"line":3}},"text": "func Suggestions() {"}]}
{"message":"multiline suggestion test","location":{"path":"_testdata/suggestions.txt","range":{"start":{"line":3},"end":{"line":4}}}, "suggestions": [{"range":{"start":{"line":3},"end":{"line":4}}, "text": "func Suggestions() {\n// Multiline suggestion!\n} // end of suggestion func"}]}
{"message":"range suggestion test (replace)","location":{"path":"_testdata/suggestions.txt","range":{"start":{"line":6,"column":5},"end":{"line":6,"column":7}}}, "suggestions": [{"range":{"start":{"line":6,"column":5},"end":{"line":6,"column":7}}, "text": "14"}]}
{"message":"range suggestion test (insert)","location":{"path":"_testdata/suggestions.txt","range":{"start":{"line":7,"column":5},"end":{"line":7,"column":5}}}, "suggestions": [{"range":{"start":{"line":7,"column":5},"end":{"line":7,"column":5}}, "text": "14"}]}
{"message":"range suggestion test (remove)","location":{"path":"_testdata/suggestions.txt","range":{"start":{"line":8,"column":5},"end":{"line":8,"column":7}}}, "suggestions": [{"range":{"start":{"line":8,"column":5},"end":{"line":8,"column":7}}, "text": ""}]}
{"message":"range suggestion test (remove line-break)","location":{"path":"_testdata/suggestions.txt","range":{"start":{"line":10,"column":5},"end":{"line":11,"column":1}}}, "suggestions": [{"range":{"start":{"line":10,"column":5},"end":{"line":11,"column":1}}, "text": ""}]}
{"message":"suggestion test (remove line)","location":{"path":"_testdata/suggestions.txt","range":{"start":{"line":13}}}, "suggestions": [{"range":{"start":{"line":13}}, "text": ""}]}
{"message":"suggestion test (insert line)","location":{"path":"_testdata/suggestions.txt","range":{"start":{"line":16,"column":1}}}, "suggestions": [{"range":{"start":{"line":16,"column":1}}, "text": "inserted line 1\ninserted line 2\n"}]}
12 changes: 12 additions & 0 deletions _testdata/suggestions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,15 @@ package testdata

func suggestions() {
}

haya13busa (replace)
hayabusa (insert)
haya14busa (remove)

--->
<--- (remove line-break)

remove line

insert line ↓
insert line ↑

0 comments on commit 180302f

Please sign in to comment.