|
| 1 | +# SYNTAX TEST "Packages/PowerShell/PowerShell.sublime-syntax" |
| 2 | + |
| 3 | +"<- Exit the imports context block" |
| 4 | + |
| 5 | + Configuration MyDscConfiguration { |
| 6 | +#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.function.powershell |
| 7 | +# ^^^^^^^^^^^^^ keyword.declaration.function.powershell |
| 8 | +# ^^^^^^^^^^^^^^^^^^ entity.name.function.powershell |
| 9 | +# ^ punctuation.section.block.begin.powershell |
| 10 | + Node "TEST-PC1" { |
| 11 | +#^^^^^^^^^^^^^^^^^^^^^^^^ meta.function.powershell |
| 12 | +# ^^^^ keyword.context.block.powershell |
| 13 | +# ^^^^^^^^^^ meta.string.interpolated.powershell string.quoted.double.powershell |
| 14 | +# ^ punctuation.definition.string.begin.powershell |
| 15 | +# ^ punctuation.definition.string.end.powershell |
| 16 | +# ^ punctuation.section.block.begin.powershell |
| 17 | + WindowsFeature MyFeatureInstance { |
| 18 | +#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.function.powershell |
| 19 | +# ^^^^^^^^^^^^^^ keyword.other.powershell |
| 20 | +# ^^^^^^^^^^^^^^^^^ entity.name.label.powershell |
| 21 | +# ^ meta.block.powershell punctuation.section.braces.begin.powershell |
| 22 | + Ensure = 'Present' |
| 23 | +#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.function.powershell meta.block.powershell |
| 24 | +# ^ keyword.operator.assignment.powershell |
| 25 | +# ^^^^^^^^^ meta.string.powershell string.quoted.single.powershell |
| 26 | +# ^ punctuation.definition.string.begin.powershell |
| 27 | +# ^ punctuation.definition.string.end.powershell |
| 28 | + Name = 'RSAT' |
| 29 | + } |
| 30 | + WindowsFeature My2ndFeatureInstance { |
| 31 | +#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.function.powershell |
| 32 | +# ^^^^^^^^^^^^^^ keyword.other.powershell |
| 33 | +# ^^^^^^^^^^^^^^^^^^^^ entity.name.label.powershell |
| 34 | +# ^ meta.block.powershell punctuation.section.braces.begin.powershell |
| 35 | + Ensure = 'Present' |
| 36 | + Name = 'Bitlocker' |
| 37 | + } |
| 38 | +#^^^^^^^^^^^^ meta.function.powershell meta.block.powershell |
| 39 | +# ^ punctuation.section.braces.end.powershell |
| 40 | + } |
| 41 | + } |
| 42 | + MyDscConfiguration |
| 43 | + |
| 44 | + |
| 45 | + Configuration MyDscConfiguration |
| 46 | + { |
| 47 | + param |
| 48 | +#^^^^^^^^^^^^ meta.function.powershell |
| 49 | +# ^^^^^ keyword.declaration.parameter.powershell |
| 50 | + ( |
| 51 | + [string[]]$ComputerName='localhost' |
| 52 | +#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.function.powershell |
| 53 | +# ^ punctuation.section.brackets.begin.powershell |
| 54 | +# ^^^^^^ storage.type.powershell |
| 55 | +# ^ punctuation.section.brackets.begin.powershell |
| 56 | +# ^^ punctuation.section.brackets.end.powershell |
| 57 | +# ^^^^^^^^^^^^^ variable.other.readwrite.powershell |
| 58 | +# ^ punctuation.definition.variable.powershell |
| 59 | +# ^ keyword.operator.assignment.powershell |
| 60 | +# ^^^^^^^^^^^ meta.string.powershell string.quoted.single.powershell |
| 61 | +# ^ punctuation.definition.string.begin.powershell |
| 62 | +# ^ punctuation.definition.string.end.powershell |
| 63 | + ) |
| 64 | + |
| 65 | + Node $ComputerName |
| 66 | + { |
| 67 | + WindowsFeature MyFeatureInstance |
| 68 | + { |
| 69 | + Ensure = 'Present' |
| 70 | + Name = 'RSAT' |
| 71 | + } |
| 72 | + |
| 73 | + WindowsFeature My2ndFeatureInstance |
| 74 | + { |
| 75 | + Ensure = 'Present' |
| 76 | + Name = 'Bitlocker' |
| 77 | + } |
| 78 | + } |
| 79 | + } |
| 80 | + MyDscConfiguration |
| 81 | + |
| 82 | + |
| 83 | + Configuration MyDscConfiguration |
| 84 | + { |
| 85 | + Node @('localhost', 'Server01') |
| 86 | +#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.function.powershell |
| 87 | +# ^^^^ keyword.context.block.powershell |
| 88 | +# ^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.group.array-expression.powershell |
| 89 | +# ^ keyword.other.array.begin.powershell |
| 90 | +# ^ punctuation.section.group.begin.powershell |
| 91 | +# ^^^^^^^^^^^ meta.string.powershell string.quoted.single.powershell |
| 92 | +# ^ punctuation.definition.string.begin.powershell |
| 93 | +# ^ punctuation.definition.string.end.powershell |
| 94 | +# ^ punctuation.separator.sequence.powershell |
| 95 | +# ^^^^^^^^^^ meta.string.powershell string.quoted.single.powershell |
| 96 | +# ^ punctuation.definition.string.begin.powershell |
| 97 | +# ^ punctuation.definition.string.end.powershell |
| 98 | +# ^ punctuation.section.group.end.powershell |
| 99 | + { |
| 100 | + WindowsFeature MyFeatureInstance |
| 101 | +#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.function.powershell |
| 102 | +# ^^^^^^^^^^^^^^ keyword.other.powershell |
| 103 | +# ^^^^^^^^^^^^^^^^^ entity.name.label.powershell |
| 104 | + { |
| 105 | + Ensure = 'Present' |
| 106 | + Name = 'RSAT' |
| 107 | + } |
| 108 | + |
| 109 | + WindowsFeature My2ndFeatureInstance |
| 110 | + { |
| 111 | + Ensure = 'Present' |
| 112 | + Name = 'Bitlocker' |
| 113 | + } |
| 114 | + } |
| 115 | + } |
| 116 | + MyDscConfiguration |
0 commit comments