Skip to content

Commit 08669ab

Browse files
committed
feat: Add inital src/data in test-case-component
1 parent 0e57d2d commit 08669ab

File tree

3 files changed

+727
-0
lines changed

3 files changed

+727
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import typescript from "./languages/typescript";
2+
import plaintext from "./languages/plaintext";
3+
4+
export const testCasesByLanguage = {
5+
typescript,
6+
plaintext,
7+
};
Lines changed: 229 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,229 @@
1+
export default [
2+
{
3+
"before": {
4+
"html": "<pre class=\"shiki css-variables\" style=\"background-color:var(--shiki-background);color:var(--shiki-foreground)\" tabindex=\"0\"><code><span class=\"line\"><span class=\"hat default selectionRight\"><span>a</span></span></span></code></pre>",
5+
"data": [
6+
[
7+
{
8+
"start": {
9+
"line": 0,
10+
"character": 0
11+
},
12+
"end": {
13+
"line": 0,
14+
"character": 1
15+
},
16+
"properties": {
17+
"class": "hat default selectionRight"
18+
},
19+
"alwaysWrap": true
20+
}
21+
]
22+
]
23+
},
24+
"during": {
25+
"html": "<pre class=\"shiki css-variables\" style=\"background-color:var(--shiki-background);color:var(--shiki-foreground)\" tabindex=\"0\"><code><span class=\"line\"><span class=\"hat default selectionRight\"><span>a</span></span></span></code></pre>",
26+
"data": [
27+
[
28+
{
29+
"start": {
30+
"line": 0,
31+
"character": 0
32+
},
33+
"end": {
34+
"line": 0,
35+
"character": 1
36+
},
37+
"properties": {
38+
"class": "hat default selectionRight"
39+
},
40+
"alwaysWrap": true
41+
}
42+
]
43+
]
44+
},
45+
"after": {
46+
"html": "<pre class=\"shiki css-variables\" style=\"background-color:var(--shiki-background);color:var(--shiki-foreground)\" tabindex=\"0\"><code><span class=\"line\"><span class=\"sourceMark\"><span>a</span></span><span class=\"thatMark selectionRight\"><span>a</span></span></span></code></pre>",
47+
"data": [
48+
[
49+
{
50+
"start": {
51+
"line": 0,
52+
"character": 0
53+
},
54+
"end": {
55+
"line": 0,
56+
"character": 1
57+
},
58+
"properties": {
59+
"class": "sourceMark"
60+
},
61+
"alwaysWrap": true
62+
},
63+
{
64+
"start": {
65+
"line": 0,
66+
"character": 1
67+
},
68+
"end": {
69+
"line": 0,
70+
"character": 2
71+
},
72+
"properties": {
73+
"class": "thatMark selectionRight"
74+
},
75+
"alwaysWrap": true
76+
}
77+
]
78+
]
79+
},
80+
"command": {
81+
"version": 6,
82+
"spokenForm": "bring air to end of air",
83+
"action": {
84+
"name": "replaceWithTarget",
85+
"source": {
86+
"type": "primitive",
87+
"mark": {
88+
"type": "decoratedSymbol",
89+
"symbolColor": "default",
90+
"character": "a"
91+
}
92+
},
93+
"destination": {
94+
"type": "primitive",
95+
"insertionMode": "to",
96+
"target": {
97+
"type": "primitive",
98+
"modifiers": [
99+
{
100+
"type": "endOf"
101+
}
102+
],
103+
"mark": {
104+
"type": "decoratedSymbol",
105+
"symbolColor": "default",
106+
"character": "a"
107+
}
108+
}
109+
}
110+
},
111+
"usePrePhraseSnapshot": true
112+
},
113+
"filename": "bringAirToEndOfAir.yml",
114+
"language": "plaintext",
115+
"raw": {
116+
"languageId": "plaintext",
117+
"command": {
118+
"version": 6,
119+
"spokenForm": "bring air to end of air",
120+
"action": {
121+
"name": "replaceWithTarget",
122+
"source": {
123+
"type": "primitive",
124+
"mark": {
125+
"type": "decoratedSymbol",
126+
"symbolColor": "default",
127+
"character": "a"
128+
}
129+
},
130+
"destination": {
131+
"type": "primitive",
132+
"insertionMode": "to",
133+
"target": {
134+
"type": "primitive",
135+
"modifiers": [
136+
{
137+
"type": "endOf"
138+
}
139+
],
140+
"mark": {
141+
"type": "decoratedSymbol",
142+
"symbolColor": "default",
143+
"character": "a"
144+
}
145+
}
146+
}
147+
},
148+
"usePrePhraseSnapshot": true
149+
},
150+
"initialState": {
151+
"documentContents": "a",
152+
"selections": [
153+
{
154+
"anchor": {
155+
"line": 0,
156+
"character": 1
157+
},
158+
"active": {
159+
"line": 0,
160+
"character": 1
161+
}
162+
}
163+
],
164+
"marks": {
165+
"default.a": {
166+
"start": {
167+
"line": 0,
168+
"character": 0
169+
},
170+
"end": {
171+
"line": 0,
172+
"character": 1
173+
}
174+
}
175+
}
176+
},
177+
"finalState": {
178+
"documentContents": "aa",
179+
"selections": [
180+
{
181+
"anchor": {
182+
"line": 0,
183+
"character": 2
184+
},
185+
"active": {
186+
"line": 0,
187+
"character": 2
188+
}
189+
}
190+
],
191+
"thatMark": [
192+
{
193+
"type": "UntypedTarget",
194+
"contentRange": {
195+
"start": {
196+
"line": 0,
197+
"character": 1
198+
},
199+
"end": {
200+
"line": 0,
201+
"character": 2
202+
}
203+
},
204+
"isReversed": false,
205+
"hasExplicitRange": true
206+
}
207+
],
208+
"sourceMark": [
209+
{
210+
"type": "UntypedTarget",
211+
"contentRange": {
212+
"start": {
213+
"line": 0,
214+
"character": 0
215+
},
216+
"end": {
217+
"line": 0,
218+
"character": 1
219+
}
220+
},
221+
"isReversed": false,
222+
"hasExplicitRange": true
223+
}
224+
]
225+
},
226+
"filename": "bringAirToEndOfAir.yml"
227+
}
228+
}
229+
];

0 commit comments

Comments
 (0)