@@ -591,26 +591,34 @@ Describe "Platform Matrix Environment Variables" -Tag "UnitTest", "envvar" {
591591 "matrix": {
592592 "foo": "bar",
593593 "envReference": ["env:TestMatrixEnvReference", "env:TestMatrixEnvReference2", "noref"]
594- }
594+ },
595+ "include": [
596+ {
597+ "foo": "bar",
598+ "envReference": "env:TestMatrixEnvReference"
599+ }
600+ ]
595601}
596602'@
597603
598604 [System.Environment ]::SetEnvironmentVariable(" TestMatrixEnvReference" , " " )
599605 [array ]$matrix = GenerateMatrix (GetMatrixConfigFromJson $matrixJson ) " sparse"
600- $matrix.Length | Should - Be 3
606+ $matrix.Length | Should - Be 4
601607 $matrix [0 ].name | Should - Be " bar"
602608 $matrix [0 ].parameters.envReference | Should - Be " "
603609
604610 [System.Environment ]::SetEnvironmentVariable(" TestMatrixEnvReference" , " replaced" )
605611 [System.Environment ]::SetEnvironmentVariable(" TestMatrixEnvReference2" , " replaced2" )
606612 [array ]$replacedMatrix = GenerateMatrix (GetMatrixConfigFromJson $matrixJson ) " sparse"
607- $replacedMatrix.Length | Should - Be 3
613+ $replacedMatrix.Length | Should - Be 4
608614 $replacedMatrix [0 ].name | Should - Be " bar_replaced"
609615 $replacedMatrix [0 ].parameters.envReference | Should - Be " replaced"
610616 $replacedMatrix [1 ].name | Should - Be " bar_replaced2"
611617 $replacedMatrix [1 ].parameters.envReference | Should - Be " replaced2"
612618 $replacedMatrix [2 ].name | Should - Be " bar_noref"
613619 $replacedMatrix [2 ].parameters.envReference | Should - Be " noref"
620+ $replacedMatrix [3 ].name | Should - Be " bar_replaced"
621+ $replacedMatrix [3 ].parameters.envReference | Should - Be " replaced"
614622 }
615623
616624 It " Should support filter/replace with variable reference syntax" {
0 commit comments