mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-08-06 17:40:58 +00:00
fix: outputs espace (#404)
* fix: outputs espace * refactor: move unescape to func * refactor: fix ci lint * refactor: unescape function
This commit is contained in:
parent
e8f6b1bb3d
commit
4282e53b56
2 changed files with 47 additions and 1 deletions
|
@ -30,6 +30,21 @@ func TestSetOutput(t *testing.T) {
|
|||
}
|
||||
handler("::set-output name=x::valz\n")
|
||||
assert.Equal("valz", rc.StepResults["my-step"].Outputs["x"])
|
||||
|
||||
handler("::set-output name=x::percent2%25\n")
|
||||
assert.Equal("percent2%", rc.StepResults["my-step"].Outputs["x"])
|
||||
|
||||
handler("::set-output name=x::percent2%25%0Atest\n")
|
||||
assert.Equal("percent2%\ntest", rc.StepResults["my-step"].Outputs["x"])
|
||||
|
||||
handler("::set-output name=x::percent2%25%0Atest another3%25test\n")
|
||||
assert.Equal("percent2%\ntest another3%test", rc.StepResults["my-step"].Outputs["x"])
|
||||
|
||||
handler("::set-output name=x%3A::percent2%25%0Atest\n")
|
||||
assert.Equal("percent2%\ntest", rc.StepResults["my-step"].Outputs["x:"])
|
||||
|
||||
handler("::set-output name=x%3A%2C%0A%25%0D%3A::percent2%25%0Atest\n")
|
||||
assert.Equal("percent2%\ntest", rc.StepResults["my-step"].Outputs["x:,\n%\r:"])
|
||||
}
|
||||
|
||||
func TestAddpath(t *testing.T) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue