Skip to content

Commit 28e0e9e

Browse files
Add lots more regression tests (#27)
And fix a couple regressions, too. The main annoyance is that YAML doesn't complain about duplicate keys, but `yq` silently discards them in the JSON conversion.
1 parent 53e44f0 commit 28e0e9e

File tree

3 files changed

+359
-28
lines changed

3 files changed

+359
-28
lines changed

fix_index.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
('docs/syntax.html',
1919
'<comment_token> SYNTAX\nTEST "<syntax_file>"',
2020
'<comment_token> SYNTAX TEST "<syntax_file>"', ),
21+
('docs/safe_mode.html',
22+
'subl--safe-mode',
23+
'subl --safe-mode', ),
2124
],
2225
'sublime-merge.docset': []
2326
}

sublime-text-dashing.yml

Lines changed: 53 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,21 @@ selectors:
4747

4848
###[ INCREMENTAL DIFF ]########################################################
4949

50-
# Commands and menus
50+
# Scopes as Tags
5151
'#styling li p':
52-
type: Style
52+
type: Tag
5353
matchpath: '/incremental_diff\.html$'
5454

5555
# Settings
56-
'dl.setting > dt[id]':
56+
'dl.setting > dt[id] ':
5757
attr: id
5858
type: Setting
5959
matchpath: '/incremental_diff\.html$'
6060

6161
###[ INDEXING ]################################################################
6262

6363
# Settings
64-
'dl.setting > dt[id]':
64+
'dl.setting > dt[id] ':
6565
attr: id
6666
type: Setting
6767
matchpath: '/indexing\.html$'
@@ -72,12 +72,12 @@ selectors:
7272

7373
# Completion kinds
7474
'#kind-info table.kinds td:not(:has(span))':
75-
type: Enum
75+
type: Value
7676
matchpath: '/completions\.html$'
7777

7878
# Completion kinds again
79-
'dl.setting ul.simple:first-child > li':
80-
type: Enum
79+
'#rich-format dl.setting:has(#kind) ul.simple > li':
80+
type: Value
8181
matchpath: '/completions\.html$'
8282

8383
# Completion fields
@@ -91,13 +91,13 @@ selectors:
9191
matchpath: '/completions\.html$'
9292

9393
# Variables
94-
'#variables table code':
94+
'#variables table span.pre':
9595
type: Variable
9696
requiretext: '\$'
9797
matchpath: '/completions\.html$'
9898

9999
# Settings
100-
'dl.setting > dt[id]':
100+
'dl.setting > dt[id] ':
101101
attr: id
102102
type: Setting
103103
matchpath: '/completions\.html$'
@@ -118,7 +118,8 @@ selectors:
118118
###[ PROJECTS ]################################################################
119119

120120
# Settings
121-
'dl.setting > dt[id]':
121+
'dl.setting > dt[id] ':
122+
attr: id
122123
type: Setting
123124
matchpath: '/projects\.html$'
124125

@@ -146,26 +147,28 @@ selectors:
146147
###[ INDENTATION SETTINGS ]####################################################
147148

148149
# Settings
149-
'dl.setting > dt[id]':
150+
'dl.setting > dt[id] ':
151+
attr: id
150152
type: Setting
151153
matchpath: '/indentation\.html$'
152154

153155
###[ SPELL CHECKING ]##########################################################
154156

155157
# Settings
156-
'dl.setting > dt[id]':
158+
'dl.setting > dt[id] ':
159+
attr: id
157160
type: Setting
158161
matchpath: '/spell_checking\.html$'
159162

160163
# Commands
161-
'#commands code':
164+
'#commands code:first-child':
162165
type: Command
163166
matchpath: '/spell_checking\.html$'
164167

165168
###[ BUILD SYSTEMS ]###########################################################
166169

167170
# Options
168-
'dl.setting > dt[id]':
171+
'dl.setting > dt[id] ':
169172
attr: id
170173
type: Option
171174
matchpath: '/build_systems\.html$'
@@ -179,7 +182,7 @@ selectors:
179182
###[ PACKAGES ]################################################################
180183

181184
# Files
182-
'li span.file':
185+
'li span.file ':
183186
type: File
184187
matchpath: '/packages\.html$'
185188

@@ -209,7 +212,7 @@ selectors:
209212
###[ REVERTING TO A FRESHLY INSTALLED STATE ]##################################
210213

211214
# Files
212-
'#reverting-to-a-freshly-installed-state > ul li span.file':
215+
'li span.file ':
213216
type: File
214217
matchpath: '/revert\.html$'
215218

@@ -227,8 +230,7 @@ selectors:
227230
# Files
228231
'li span.file':
229232
type: File
230-
requiretext: 'license'
231-
matchpath: '/packages\.html$'
233+
matchpath: '/portable_license_keys\.html$'
232234

233235
###[ COLOR SCHEMES ]###########################################################
234236

@@ -238,7 +240,8 @@ selectors:
238240
matchpath: '/color_schemes\.html$'
239241

240242
# Settings
241-
'dl.setting > dt[id]':
243+
'dl.setting > dt[id] ':
244+
attr: id
242245
type: Setting
243246
matchpath: '/color_schemes\.html$'
244247

@@ -248,14 +251,15 @@ selectors:
248251
matchpath: '/color_schemes\.html$'
249252

250253
# CSS Colors
251-
'#appendix-css-colors li span:not(.color-block)':
254+
'#appendix-css-colors span:not(.color-block)':
252255
type: Value
253256
matchpath: '/color_schemes\.html$'
254257

255258
###[ THEMES ]##################################################################
256259

257260
# Settings
258-
'dl.setting > dt[id]':
261+
'dl.setting > dt[id] ':
262+
attr: id
259263
type: Setting
260264
matchpath: '/themes\.html$'
261265

@@ -278,7 +282,8 @@ selectors:
278282
###[ MENUS ]###################################################################
279283

280284
# Settings
281-
'dl.setting > dt[id]':
285+
'dl.setting > dt[id] ':
286+
attr: id
282287
type: Setting
283288
matchpath: '/menus\.html$'
284289

@@ -334,8 +339,13 @@ selectors:
334339

335340
###[ SYNTAX DEFINITIONS ]######################################################
336341

337-
# Syntax
338-
'dl.setting span.pre':
342+
# Syntax header
343+
'#header dl.setting > dt > span.sig-name':
344+
type: Trait
345+
matchpath: '/syntax\.html$'
346+
347+
# Syntax body
348+
'#contexts dl.setting > dt > span.sig-name':
339349
type: Instruction
340350
matchpath: '/syntax\.html$'
341351

@@ -346,22 +356,37 @@ selectors:
346356

347357
###[ SCOPE NAMING ]############################################################
348358

349-
# Scope names as Values
359+
# Scope names as Tags
350360
'ul.simple li code':
351-
type: Value
361+
type: Tag
352362
matchpath: '/scope_naming\.html$'
353363

354364
###[ MINIHTML REFERENCE ]######################################################
355365

356366
# Elements
357-
'#tags li > code':
367+
'#tags li code':
358368
type: Element
359369
requiretext: '<.+>'
360370
matchpath: '/minihtml\.html$'
361371

372+
# Attributes
373+
'#attributes li code':
374+
type: Attribute
375+
matchpath: '/minihtml\.html$'
376+
362377
# CSS styles
363-
'#css li code:first-child':
378+
'#css > ul li code:first-child':
364379
type: Style
365380
matchpath: '/minihtml\.html$'
366381

382+
# Color functions
383+
'#color-mod-function-proprietary > ul li code':
384+
type: Function
385+
matchpath: '/minihtml\.html$'
386+
387+
# Variables
388+
'#predefined-variables > ul li code':
389+
type: Variable
390+
matchpath: '/minihtml\.html$'
391+
367392
###[ PLUGIN PORTING GUIDE ]####################################################

0 commit comments

Comments
 (0)