Skip to content

Commit cd97cea

Browse files
committed
add object property index using function
1 parent db99514 commit cd97cea

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

dsc/tests/dsc_expressions.tests.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Describe 'Expressions tests' {
1717
@{ text = "[parameters('test')['array'][1][0]]"; expected = 'two' }
1818
@{ text = "[parameters('test')['objectArray'][0]['name']]"; expected = 'one' }
1919
@{ text = "[parameters('test')['objectArray'][1]['value'][1]['name']]"; expected = 'three' }
20+
@{ text = "[parameters('test')[parameters('propertyName')]]"; expected = '@{world=there}' }
2021
) {
2122
param($text, $expected)
2223
$yaml = @"
@@ -40,6 +41,9 @@ Describe 'Expressions tests' {
4041
- nestedObject:
4142
name: three
4243
value: 3
44+
propertyName:
45+
type: string
46+
defaultValue: hello
4347
resources:
4448
- name: echo
4549
type: Microsoft.DSC.Debug/Echo

0 commit comments

Comments
 (0)