Add test to reproduce crash computing examples/simple
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
This commit is contained in:
parent
27a44a9e58
commit
216e808465
@ -5,6 +5,17 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func TestValidateEmptyValue(t *testing.T) {
|
||||||
|
cc := &Compiler{}
|
||||||
|
v, err := cc.Compile("", "#dagger: compute: _")
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
if err := v.Get("#dagger.compute").Validate("#Script"); err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func TestLocalScript(t *testing.T) {
|
func TestLocalScript(t *testing.T) {
|
||||||
cc := &Compiler{}
|
cc := &Compiler{}
|
||||||
src := `[{do: "local", dir: "foo"}]`
|
src := `[{do: "local", dir: "foo"}]`
|
||||||
|
Reference in New Issue
Block a user