Skip to content

Commit abca63f

Browse files
jwortmannmichaelblyons
authored andcommitted
Tweak syntax tests
1 parent bc47f5b commit abca63f

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

Tests/syntax_test_PowerShell.ps1

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -163,18 +163,20 @@ $variable.Name.Method( )
163163
# In double-quoted strings, only the variable should be highlighted, not the property
164164
"This is my $variable.Name!"
165165
# <- punctuation.definition.string.begin
166-
#^^^^^^^^^^^ meta.string string.quoted.double
166+
#^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.string
167+
#^^^^^^^^^^^ string.quoted.double
167168
# ^^^^^^^^^ meta.interpolation variable.other.readwrite - string
168169
# ^ punctuation.definition.variable
169-
# ^^^^^^ meta.string string.quoted.double - meta.interpolation - variable - punctuation
170+
# ^^^^^^ string.quoted.double - meta.interpolation - variable - punctuation
170171
# ^ punctuation.definition.string.end
171172

172173
# When used in a subexpression, both should be highlighted
173174
"This is my $($variable.Name)!"
174175
# <- punctuation.definition.string.begin
175-
#^^^^^^^^^^^ meta.string string.quoted.double
176-
# ^^^^^^^^^^^^^^^^^ meta.string meta.interpolation - string
177-
# ^^ meta.string string.quoted.double - meta.interpolation
176+
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.string
177+
#^^^^^^^^^^^ string.quoted.double
178+
# ^^^^^^^^^^^^^^^^^ meta.interpolation - string
179+
# ^^ string.quoted.double - meta.interpolation
178180
# ^^ punctuation.section.interpolation.begin
179181
# ^^^^^^^^^ variable.other.readwrite
180182
# ^ punctuation.definition.variable
@@ -186,8 +188,9 @@ $variable.Name.Method( )
186188
# $ENV:ComputerName should be highlighted
187189
"This is the name of my computer: $ENV:ComputerName"
188190
# <- punctuation.definition.string.begin
189-
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.string string.quoted.double
190-
# ^^^^^^^^^^^^^^^^^ meta.string meta.interpolation - string
191+
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.string
192+
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ string.quoted.double
193+
# ^^^^^^^^^^^^^^^^^ meta.interpolation - string
191194
# ^ punctuation.definition.variable
192195
# ^^^^ support.variable.drive
193196
# ^^^^^^^^^^^^ variable.other.readwrite
@@ -196,8 +199,9 @@ $variable.Name.Method( )
196199
# Here as well
197200
"This is the name of my computer: ${ENV:ComputerName}"
198201
# <- punctuation.definition.string.begin
199-
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.string string.quoted.double
200-
# ^^^^^^^^^^^^^^^^^^^ meta.string meta.interpolation - string
202+
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.string
203+
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ string.quoted.double
204+
# ^^^^^^^^^^^^^^^^^^^ meta.interpolation - string
201205
# ^ punctuation.definition.variable
202206
# ^ punctuation.section.braces.begin
203207
# ^^^^ support.variable.drive
@@ -206,7 +210,7 @@ $variable.Name.Method( )
206210

207211
# The @splat references only work in argument mode, should not highlight in strings
208212
"This is a @double quoted string."
209-
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ string.quoted.double
213+
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.string string.quoted.double
210214
# ^ - punctuation.definition.variable
211215
# ^^^^^^^ - variable
212216

@@ -219,7 +223,7 @@ $variable.Name.Method( )
219223
# Single quotes string
220224
'This is a string'
221225
# <- punctuation.definition.string.begin
222-
#^^^^^^^^^^^^^^^^^ string.quoted.single
226+
#^^^^^^^^^^^^^^^^^ meta.string string.quoted.single
223227
# ^ punctuation.definition.string.end
224228

225229
# Hashtable

0 commit comments

Comments
 (0)