Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
This commit is contained in:
Solomon Hykes
2021-01-05 00:37:29 -08:00
parent 22500ad9db
commit 3162ca0991
25 changed files with 1664 additions and 1296 deletions

35
dagger/value_test.go Normal file
View File

@@ -0,0 +1,35 @@
package dagger
import (
"testing"
)
func TestSimple(t *testing.T) {
cc := &Compiler{}
_, err := cc.EmptyStruct()
if err != nil {
t.Fatal(err)
}
}
func TestCompileBootScript(t *testing.T) {
cc := &Compiler{}
s, err := cc.CompileScript("boot.cue", defaultBootScript)
if err != nil {
t.Fatal(err)
}
if err := s.Validate(); err != nil {
t.Fatal(err)
}
}
func TestCompileSimpleScript(t *testing.T) {
cc := &Compiler{}
s, err := cc.CompileScript("simple.cue", `[{do: "local", dir: "."}]`)
if err != nil {
t.Fatal(err)
}
if err := s.Validate(); err != nil {
t.Fatal(err)
}
}