integration test

This commit is contained in:
Casey Lee
2020-02-24 12:48:12 -08:00
parent 6c632946be
commit 037e08a3a7
12 changed files with 94 additions and 73 deletions

View File

@@ -60,3 +60,16 @@ func TestStopCommands(t *testing.T) {
handler("::set-env name=x::abcd\n")
assert.Equal("abcd", rc.Env["x"])
}
func TestAddpathADO(t *testing.T) {
assert := assert.New(t)
ctx := context.Background()
rc := new(RunContext)
handler := rc.commandHandler(ctx)
handler("##[add-path]/zoo\n")
assert.Equal("/zoo", rc.ExtraPath[0])
handler("##[add-path]/boo\n")
assert.Equal("/boo", rc.ExtraPath[1])
}