Skip to content

Commit ee06b67

Browse files
committed
ci: add self-test for multiline output
1 parent dcc08ed commit ee06b67

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,14 +146,22 @@ jobs:
146146
run: |
147147
Import-Module ./lib/GitHubActionsCore -Force
148148
Set-ActionOutput testout testval
149+
Set-ActionOutput testout-multiline "testval`n new line `n 3rd line"
149150
- name: Set-ActionOutput test (assert)
150151
uses: ./
152+
env:
153+
testout_output: ${{ steps.Set-ActionOutput.outputs.testout }}
154+
testout_multiline_output: ${{ steps.Set-ActionOutput.outputs.testout-multiline }}
151155
with:
152156
script: |
153-
$output = '${{ steps.Set-ActionOutput.outputs.testout }}'
157+
$output = $env:testout_output
154158
if ($output -cne 'testval') {
155159
throw "unexpected: Set-ActionOutput failed.`n$output"
156160
}
161+
$output = $env:testout_multiline_output
162+
if ($output -cne "testval`n new line `n 3rd line") {
163+
throw "unexpected: Set-ActionOutput failed.`n$output"
164+
}
157165
158166
# Add-ActionPath
159167
- name: Add-ActionPath test (act)

0 commit comments

Comments
 (0)