3
=============================== Тесты языкового клиента (json) ===============================
5
----- test/source/lsp/client/json/check-01.txt -----
11
----- test/source/lsp/client/json/check-02.txt -----
13
o "test/source/lsp/client/json/json/ex-01.json"
15
= textDocument/publishDiagnostics => {"jsonrpc_version":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"test/source/lsp/client/json/json/ex-01.json","version":0,"diagnostics":[]}}
16
= textDocument/documentSymbol => {"jsonrpc_version":"2.0","result":[],"id":2}
17
= textDocument/semanticTokens => {"jsonrpc_version":"2.0","result":{"data":[]},"id":3}
20
----- test/source/lsp/client/json/check-03.txt -----
22
o "test/source/lsp/client/json/json/ex-02.json"
23
o "test/source/lsp/client/json/json/ex-03.json"
25
c "test/source/lsp/client/json/json/ex-02.json"
26
c "test/source/lsp/client/json/json/ex-03.json"
28
= textDocument/publishDiagnostics => {"jsonrpc_version":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"test/source/lsp/client/json/json/ex-02.json","version":0,"diagnostics":[]}}
29
= textDocument/publishDiagnostics => {"jsonrpc_version":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"test/source/lsp/client/json/json/ex-03.json","version":0,"diagnostics":[]}}
30
= textDocument/documentSymbol => {"jsonrpc_version":"2.0","result":[],"id":2}
31
= textDocument/semanticTokens => {"jsonrpc_version":"2.0","result":{"data":[]},"id":3}
32
= textDocument/documentSymbol => {"jsonrpc_version":"2.0","result":[{"name":"\"1\"","detail":"\"1\" [2,5]","kind":13,"range":{"start":{"line":1,"character":4},"end":{"line":1,"character":7}},"selectionRange":{"start":{"line":1,"character":4},"end":{"line":1,"character":7}}},{"name":"\"2\"","detail":"\"2\" [3,5]","kind":13,"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":7}},"selectionRange":{"start":{"line":2,"character":4},"end":{"line":2,"character":7}}},{"name":"\"3\"","detail":"\"3\" [4,5]","kind":13,"range":{"start":{"line":3,"character":4},"end":{"line":3,"character":7}},"selectionRange":{"start":{"line":3,"character":4},"end":{"line":3,"character":7}}},{"name":"\"4\"","detail":"\"4\" [5,5]","kind":13,"range":{"start":{"line":4,"character":4},"end":{"line":4,"character":7}},"selectionRange":{"start":{"line":4,"character":4},"end":{"line":4,"character":7}}},{"name":"\"5\"","detail":"\"5\" [6,5]","kind":13,"range":{"start":{"line":5,"character":4},"end":{"line":5,"character":7}},"selectionRange":{"start":{"line":5,"character":4},"end":{"line":5,"character":7}}},{"name":"\"1\"","detail":"\"1\" [7,9]","kind":13,"range":{"start":{"line":6,"character":8},"end":{"line":6,"character":11}},"selectionRange":{"start":{"line":6,"character":8},"end":{"line":6,"character":11}}},{"name":"\"2\"","detail":"\"2\" [8,9]","kind":13,"range":{"start":{"line":7,"character":8},"end":{"line":7,"character":11}},"selectionRange":{"start":{"line":7,"character":8},"end":{"line":7,"character":11}}},{"name":"\"6\"","detail":"\"6\" [10,5]","kind":13,"range":{"start":{"line":9,"character":4},"end":{"line":9,"character":7}},"selectionRange":{"start":{"line":9,"character":4},"end":{"line":9,"character":7}}}],"id":4}
33
= textDocument/semanticTokens => {"jsonrpc_version":"2.0","result":{"data":[1,4,3,0,0,2,4,3,0,0,3,4,3,0,0,4,4,3,0,0,5,4,3,0,0,6,8,3,0,0,7,8,3,0,0,9,4,3,0,0]},"id":5}
36
----- test/source/lsp/client/json/check-04.txt -----
38
o "test/source/lsp/client/json/json/check-01.json"
40
= textDocument/publishDiagnostics => {"jsonrpc_version":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"test/source/lsp/client/json/json/check-01.json","version":0,"diagnostics":[{"range":{"start":{"line":5,"character":4},"end":{"line":5,"character":7}},"severity":1,"source":"SIMODO/loom","message":"Member '2' is duplicated
Позиция разбора: test/source/lsp/client/json/json/check-01.json:6:5[6,8]"}]}}
41
= textDocument/documentSymbol => {"jsonrpc_version":"2.0","result":[{"name":"\"1\"","detail":"\"1\" [2,5]","kind":13,"range":{"start":{"line":1,"character":4},"end":{"line":1,"character":7}},"selectionRange":{"start":{"line":1,"character":4},"end":{"line":1,"character":7}}},{"name":"\"2\"","detail":"\"2\" [3,5]","kind":13,"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":7}},"selectionRange":{"start":{"line":2,"character":4},"end":{"line":2,"character":7}}},{"name":"\"3\"","detail":"\"3\" [4,5]","kind":13,"range":{"start":{"line":3,"character":4},"end":{"line":3,"character":7}},"selectionRange":{"start":{"line":3,"character":4},"end":{"line":3,"character":7}}},{"name":"\"4\"","detail":"\"4\" [5,5]","kind":13,"range":{"start":{"line":4,"character":4},"end":{"line":4,"character":7}},"selectionRange":{"start":{"line":4,"character":4},"end":{"line":4,"character":7}}},{"name":"\"2\"","detail":"\"2\" [6,5]","kind":13,"range":{"start":{"line":5,"character":4},"end":{"line":5,"character":7}},"selectionRange":{"start":{"line":5,"character":4},"end":{"line":5,"character":7}}},{"name":"\"6\"","detail":"\"6\" [7,5]","kind":13,"range":{"start":{"line":6,"character":4},"end":{"line":6,"character":7}},"selectionRange":{"start":{"line":6,"character":4},"end":{"line":6,"character":7}}}],"id":2}
42
= textDocument/semanticTokens => {"jsonrpc_version":"2.0","result":{"data":[1,4,3,0,0,2,4,3,0,0,3,4,3,0,0,4,4,3,0,0,5,4,3,0,0,6,4,3,0,0]},"id":3}
45
=============================== Тесты языкового клиента (simodo) ===============================
47
----- test/source/lsp/client/simodo/script/check/00-blank/00.txt -----
53
----- test/source/lsp/client/simodo/script/check/01-open/01-blank.txt -----
55
o "test/source/lsp/client/simodo/script/examples/blank.simodo-script"
57
= textDocument/publishDiagnostics => {"jsonrpc_version":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"test/source/lsp/client/simodo/script/examples/blank.simodo-script","version":0,"diagnostics":[]}}
58
= textDocument/documentSymbol => {"jsonrpc_version":"2.0","result":[],"id":2}
59
= textDocument/semanticTokens => {"jsonrpc_version":"2.0","result":{"data":[]},"id":3}
62
----- test/source/lsp/client/simodo/script/check/01-open/02-bubble.txt -----
64
o "test/source/lsp/client/simodo/script/examples/bubble.simodo-script"
66
= textDocument/publishDiagnostics => {"jsonrpc_version":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"test/source/lsp/client/simodo/script/examples/bubble.simodo-script","version":0,"diagnostics":[]}}
67
= textDocument/documentSymbol => {"jsonrpc_version":"2.0","result":[{"name":"a","detail":"array : a","kind":13,"range":{"start":{"line":2,"character":11},"end":{"line":2,"character":12}},"selectionRange":{"start":{"line":2,"character":11},"end":{"line":2,"character":12}}}],"id":2}
68
= textDocument/semanticTokens => {"jsonrpc_version":"2.0","result":{"data":[2,0,3,11,0,2,4,4,10,1,2,11,1,0,2,4,0,5,11,0,4,6,1,0,1,6,0,3,11,0,6,4,3,10,1,6,10,1,0,2,6,12,2,11,0,6,15,5,10,1,7,4,3,11,0,7,8,3,10,1,7,14,1,0,2,7,16,2,11,0,7,19,5,10,1,7,25,1,0,1,8,8,2,11,0,8,11,1,0,1,8,13,1,0,1,8,18,1,0,1,8,20,1,0,1,9,12,3,11,0,9,16,4,10,1,9,23,1,0,2,9,27,1,0,1,9,29,1,0,1,10,12,1,0,1,10,14,1,0,1,10,19,1,0,1,10,21,1,0,1,11,12,1,0,1,11,14,1,0,1,11,19,1,0,1,14,0,5,11,0,14,6,1,0,1]},"id":3}
71
----- test/source/lsp/client/simodo/script/check/01-open/03-primes.txt -----
73
o "test/source/lsp/client/simodo/script/examples/bubble.simodo-script"
75
= textDocument/publishDiagnostics => {"jsonrpc_version":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"test/source/lsp/client/simodo/script/examples/bubble.simodo-script","version":0,"diagnostics":[]}}
76
= textDocument/documentSymbol => {"jsonrpc_version":"2.0","result":[{"name":"a","detail":"array : a","kind":13,"range":{"start":{"line":2,"character":11},"end":{"line":2,"character":12}},"selectionRange":{"start":{"line":2,"character":11},"end":{"line":2,"character":12}}}],"id":2}
77
= textDocument/semanticTokens => {"jsonrpc_version":"2.0","result":{"data":[2,0,3,11,0,2,4,4,10,1,2,11,1,0,2,4,0,5,11,0,4,6,1,0,1,6,0,3,11,0,6,4,3,10,1,6,10,1,0,2,6,12,2,11,0,6,15,5,10,1,7,4,3,11,0,7,8,3,10,1,7,14,1,0,2,7,16,2,11,0,7,19,5,10,1,7,25,1,0,1,8,8,2,11,0,8,11,1,0,1,8,13,1,0,1,8,18,1,0,1,8,20,1,0,1,9,12,3,11,0,9,16,4,10,1,9,23,1,0,2,9,27,1,0,1,9,29,1,0,1,10,12,1,0,1,10,14,1,0,1,10,19,1,0,1,10,21,1,0,1,11,12,1,0,1,11,14,1,0,1,11,19,1,0,1,14,0,5,11,0,14,6,1,0,1]},"id":3}
80
----- test/source/lsp/client/simodo/script/check/02-sf/01-bubble.txt -----
82
sf "test/source/lsp/client/simodo/script/examples/bubble.simodo-script"
86
----- test/source/lsp/client/simodo/script/check/03-hover/01-FunctionName-01.txt -----
88
o "test/source/lsp/client/simodo/script/examples/primes.simodo-script"
90
h "test/source/lsp/client/simodo/script/examples/primes.simodo-script" 6 10
92
= textDocument/publishDiagnostics => {"jsonrpc_version":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"test/source/lsp/client/simodo/script/examples/primes.simodo-script","version":0,"diagnostics":[]}}
93
= textDocument/documentSymbol => {"jsonrpc_version":"2.0","result":[{"name":"check_prime","detail":"fn check_prime (int : no) -> bool","kind":12,"range":{"start":{"line":6,"character":3},"end":{"line":13,"character":1}},"selectionRange":{"start":{"line":6,"character":3},"end":{"line":6,"character":14}}},{"name":"start","detail":"int : start = 1","kind":13,"range":{"start":{"line":15,"character":10},"end":{"line":15,"character":15}},"selectionRange":{"start":{"line":15,"character":10},"end":{"line":15,"character":15}}},{"name":"end","detail":"int : end = 1500","kind":13,"range":{"start":{"line":16,"character":10},"end":{"line":16,"character":13}},"selectionRange":{"start":{"line":16,"character":10},"end":{"line":16,"character":13}}}],"id":2}
94
= textDocument/semanticTokens => {"jsonrpc_version":"2.0","result":{"data":[6,0,2,11,0,6,3,11,5,2,6,15,3,10,1,6,21,2,0,10,6,28,4,10,1,8,4,3,11,0,8,8,3,10,1,8,14,1,0,2,8,16,2,11,0,8,19,5,10,1,8,28,2,0,1,9,8,2,11,0,10,12,6,11,0,10,19,5,13,0,12,4,6,11,0,12,11,4,13,0,15,0,3,11,0,15,4,3,10,1,15,10,5,0,2,16,0,3,11,0,16,4,3,10,1,16,10,3,0,2,18,0,5,11,0,18,40,5,0,1,18,57,3,0,1,20,0,3,11,0,20,4,3,10,1,20,10,1,0,2,20,12,2,11,0,20,15,5,10,1,20,21,5,0,1,20,27,3,0,1,21,4,2,11,0,21,7,11,6,1,21,19,1,0,1,22,8,5,11,0,22,14,1,0,1]},"id":3}
95
= textDocument/hover => {"jsonrpc_version":"2.0","result":{"contents":{"kind":"plaintext","value":"fn check_prime (int : no) -> bool
#{initial_value:<null>, origin:"variable", property:true, tethered:true}"},"range":{"start":{"line":6,"character":3},"end":{"line":6,"character":14}}},"id":4}
98
----- test/source/lsp/client/simodo/script/check/03-hover/02-VariableUse-01.txt -----
100
o "test/source/lsp/client/simodo/script/examples/primes.simodo-script"
102
h "test/source/lsp/client/simodo/script/examples/primes.simodo-script" 18 42
104
= textDocument/publishDiagnostics => {"jsonrpc_version":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"test/source/lsp/client/simodo/script/examples/primes.simodo-script","version":0,"diagnostics":[]}}
105
= textDocument/documentSymbol => {"jsonrpc_version":"2.0","result":[{"name":"check_prime","detail":"fn check_prime (int : no) -> bool","kind":12,"range":{"start":{"line":6,"character":3},"end":{"line":13,"character":1}},"selectionRange":{"start":{"line":6,"character":3},"end":{"line":6,"character":14}}},{"name":"start","detail":"int : start = 1","kind":13,"range":{"start":{"line":15,"character":10},"end":{"line":15,"character":15}},"selectionRange":{"start":{"line":15,"character":10},"end":{"line":15,"character":15}}},{"name":"end","detail":"int : end = 1500","kind":13,"range":{"start":{"line":16,"character":10},"end":{"line":16,"character":13}},"selectionRange":{"start":{"line":16,"character":10},"end":{"line":16,"character":13}}}],"id":2}
106
= textDocument/semanticTokens => {"jsonrpc_version":"2.0","result":{"data":[6,0,2,11,0,6,3,11,5,2,6,15,3,10,1,6,21,2,0,10,6,28,4,10,1,8,4,3,11,0,8,8,3,10,1,8,14,1,0,2,8,16,2,11,0,8,19,5,10,1,8,28,2,0,1,9,8,2,11,0,10,12,6,11,0,10,19,5,13,0,12,4,6,11,0,12,11,4,13,0,15,0,3,11,0,15,4,3,10,1,15,10,5,0,2,16,0,3,11,0,16,4,3,10,1,16,10,3,0,2,18,0,5,11,0,18,40,5,0,1,18,57,3,0,1,20,0,3,11,0,20,4,3,10,1,20,10,1,0,2,20,12,2,11,0,20,15,5,10,1,20,21,5,0,1,20,27,3,0,1,21,4,2,11,0,21,7,11,6,1,21,19,1,0,1,22,8,5,11,0,22,14,1,0,1]},"id":3}
107
= textDocument/hover => {"jsonrpc_version":"2.0","result":{"contents":{"kind":"plaintext","value":"int : start = 1
#{initial_value:0, origin:"variable", property:true}"},"range":{"start":{"line":18,"character":40},"end":{"line":18,"character":45}}},"id":4}
110
----- test/source/lsp/client/simodo/script/check/03-hover/02-VariableUse-02.txt -----
112
o "test/source/lsp/client/simodo/script/examples/primes.simodo-script"
114
h "test/source/lsp/client/simodo/script/examples/primes.simodo-script" 20 24
116
= textDocument/publishDiagnostics => {"jsonrpc_version":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"test/source/lsp/client/simodo/script/examples/primes.simodo-script","version":0,"diagnostics":[]}}
117
= textDocument/documentSymbol => {"jsonrpc_version":"2.0","result":[{"name":"check_prime","detail":"fn check_prime (int : no) -> bool","kind":12,"range":{"start":{"line":6,"character":3},"end":{"line":13,"character":1}},"selectionRange":{"start":{"line":6,"character":3},"end":{"line":6,"character":14}}},{"name":"start","detail":"int : start = 1","kind":13,"range":{"start":{"line":15,"character":10},"end":{"line":15,"character":15}},"selectionRange":{"start":{"line":15,"character":10},"end":{"line":15,"character":15}}},{"name":"end","detail":"int : end = 1500","kind":13,"range":{"start":{"line":16,"character":10},"end":{"line":16,"character":13}},"selectionRange":{"start":{"line":16,"character":10},"end":{"line":16,"character":13}}}],"id":2}
118
= textDocument/semanticTokens => {"jsonrpc_version":"2.0","result":{"data":[6,0,2,11,0,6,3,11,5,2,6,15,3,10,1,6,21,2,0,10,6,28,4,10,1,8,4,3,11,0,8,8,3,10,1,8,14,1,0,2,8,16,2,11,0,8,19,5,10,1,8,28,2,0,1,9,8,2,11,0,10,12,6,11,0,10,19,5,13,0,12,4,6,11,0,12,11,4,13,0,15,0,3,11,0,15,4,3,10,1,15,10,5,0,2,16,0,3,11,0,16,4,3,10,1,16,10,3,0,2,18,0,5,11,0,18,40,5,0,1,18,57,3,0,1,20,0,3,11,0,20,4,3,10,1,20,10,1,0,2,20,12,2,11,0,20,15,5,10,1,20,21,5,0,1,20,27,3,0,1,21,4,2,11,0,21,7,11,6,1,21,19,1,0,1,22,8,5,11,0,22,14,1,0,1]},"id":3}
119
= textDocument/hover => {"jsonrpc_version":"2.0","result":{"contents":{"kind":"plaintext","value":"int : start = 1
#{initial_value:0, origin:"variable", property:true}"},"range":{"start":{"line":20,"character":21},"end":{"line":20,"character":26}}},"id":4}
122
----- test/source/lsp/client/simodo/script/check/03-hover/03-VariableDeclare-01.txt -----
124
o "test/source/lsp/client/simodo/script/examples/primes.simodo-script"
126
h "test/source/lsp/client/simodo/script/examples/primes.simodo-script" 15 12
128
= textDocument/publishDiagnostics => {"jsonrpc_version":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"test/source/lsp/client/simodo/script/examples/primes.simodo-script","version":0,"diagnostics":[]}}
129
= textDocument/documentSymbol => {"jsonrpc_version":"2.0","result":[{"name":"check_prime","detail":"fn check_prime (int : no) -> bool","kind":12,"range":{"start":{"line":6,"character":3},"end":{"line":13,"character":1}},"selectionRange":{"start":{"line":6,"character":3},"end":{"line":6,"character":14}}},{"name":"start","detail":"int : start = 1","kind":13,"range":{"start":{"line":15,"character":10},"end":{"line":15,"character":15}},"selectionRange":{"start":{"line":15,"character":10},"end":{"line":15,"character":15}}},{"name":"end","detail":"int : end = 1500","kind":13,"range":{"start":{"line":16,"character":10},"end":{"line":16,"character":13}},"selectionRange":{"start":{"line":16,"character":10},"end":{"line":16,"character":13}}}],"id":2}
130
= textDocument/semanticTokens => {"jsonrpc_version":"2.0","result":{"data":[6,0,2,11,0,6,3,11,5,2,6,15,3,10,1,6,21,2,0,10,6,28,4,10,1,8,4,3,11,0,8,8,3,10,1,8,14,1,0,2,8,16,2,11,0,8,19,5,10,1,8,28,2,0,1,9,8,2,11,0,10,12,6,11,0,10,19,5,13,0,12,4,6,11,0,12,11,4,13,0,15,0,3,11,0,15,4,3,10,1,15,10,5,0,2,16,0,3,11,0,16,4,3,10,1,16,10,3,0,2,18,0,5,11,0,18,40,5,0,1,18,57,3,0,1,20,0,3,11,0,20,4,3,10,1,20,10,1,0,2,20,12,2,11,0,20,15,5,10,1,20,21,5,0,1,20,27,3,0,1,21,4,2,11,0,21,7,11,6,1,21,19,1,0,1,22,8,5,11,0,22,14,1,0,1]},"id":3}
131
= textDocument/hover => {"jsonrpc_version":"2.0","result":{"contents":{"kind":"plaintext","value":"int : start = 1
#{initial_value:0, origin:"variable", property:true}"},"range":{"start":{"line":15,"character":10},"end":{"line":15,"character":15}}},"id":4}
134
----- test/source/lsp/client/simodo/script/check/04-goto/01-VariableUse-01.txt -----
136
o "test/source/lsp/client/simodo/script/examples/primes.simodo-script"
138
go "test/source/lsp/client/simodo/script/examples/primes.simodo-script" 18 42
140
= textDocument/publishDiagnostics => {"jsonrpc_version":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"test/source/lsp/client/simodo/script/examples/primes.simodo-script","version":0,"diagnostics":[]}}
141
= textDocument/documentSymbol => {"jsonrpc_version":"2.0","result":[{"name":"check_prime","detail":"fn check_prime (int : no) -> bool","kind":12,"range":{"start":{"line":6,"character":3},"end":{"line":13,"character":1}},"selectionRange":{"start":{"line":6,"character":3},"end":{"line":6,"character":14}}},{"name":"start","detail":"int : start = 1","kind":13,"range":{"start":{"line":15,"character":10},"end":{"line":15,"character":15}},"selectionRange":{"start":{"line":15,"character":10},"end":{"line":15,"character":15}}},{"name":"end","detail":"int : end = 1500","kind":13,"range":{"start":{"line":16,"character":10},"end":{"line":16,"character":13}},"selectionRange":{"start":{"line":16,"character":10},"end":{"line":16,"character":13}}}],"id":2}
142
= textDocument/semanticTokens => {"jsonrpc_version":"2.0","result":{"data":[6,0,2,11,0,6,3,11,5,2,6,15,3,10,1,6,21,2,0,10,6,28,4,10,1,8,4,3,11,0,8,8,3,10,1,8,14,1,0,2,8,16,2,11,0,8,19,5,10,1,8,28,2,0,1,9,8,2,11,0,10,12,6,11,0,10,19,5,13,0,12,4,6,11,0,12,11,4,13,0,15,0,3,11,0,15,4,3,10,1,15,10,5,0,2,16,0,3,11,0,16,4,3,10,1,16,10,3,0,2,18,0,5,11,0,18,40,5,0,1,18,57,3,0,1,20,0,3,11,0,20,4,3,10,1,20,10,1,0,2,20,12,2,11,0,20,15,5,10,1,20,21,5,0,1,20,27,3,0,1,21,4,2,11,0,21,7,11,6,1,21,19,1,0,1,22,8,5,11,0,22,14,1,0,1]},"id":3}
143
= textDocument/definition => {"jsonrpc_version":"2.0","result":{"uri":"test/source/lsp/client/simodo/script/examples/primes.simodo-script","range":{"start":{"line":15,"character":10},"end":{"line":15,"character":15}}},"id":4}