mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-08-06 17:40:58 +00:00
initial support for expressons
Signed-off-by: Casey Lee <cplee@nektos.com>
This commit is contained in:
parent
7183c74cd0
commit
b8589c4e9b
10 changed files with 286 additions and 108 deletions
|
@ -21,10 +21,15 @@ func TestSetOutput(t *testing.T) {
|
|||
assert := assert.New(t)
|
||||
ctx := context.Background()
|
||||
rc := new(RunContext)
|
||||
rc.StepResults = make(map[string]*stepResult)
|
||||
handler := rc.commandHandler(ctx)
|
||||
|
||||
rc.CurrentStep = "my-step"
|
||||
rc.StepResults[rc.CurrentStep] = &stepResult{
|
||||
Outputs: make(map[string]string),
|
||||
}
|
||||
handler("::set-output name=x::valz\n")
|
||||
assert.Equal("valz", rc.Outputs["x"])
|
||||
assert.Equal("valz", rc.StepResults["my-step"].Outputs["x"])
|
||||
}
|
||||
|
||||
func TestAddpath(t *testing.T) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue