diff --git a/lang/interpret_test/TestAstFunc1/duplicate_resource.graph b/lang/interpret_test/TestAstFunc1/duplicate_resource.graph new file mode 100644 index 00000000..193d5a44 --- /dev/null +++ b/lang/interpret_test/TestAstFunc1/duplicate_resource.graph @@ -0,0 +1,10 @@ +Edge: str(hello world) -> call:fmt.printf(str(hello world)) # a +Vertex: call:fmt.printf(str(hello world)) +Vertex: str(/tmp/foo) +Vertex: str(/tmp/foo) +Vertex: str(cowsay) +Vertex: str(cowsay) +Vertex: str(hello world) +Vertex: str(hello world) +Vertex: str(installed) +Vertex: str(newest) diff --git a/lang/interpret_test/TestAstFunc1/duplicate_resource/main.mcl b/lang/interpret_test/TestAstFunc1/duplicate_resource/main.mcl new file mode 100644 index 00000000..6f15b578 --- /dev/null +++ b/lang/interpret_test/TestAstFunc1/duplicate_resource/main.mcl @@ -0,0 +1,17 @@ +import "fmt" + +# these two resources are identical to each other, so we should allow it +file "/tmp/foo" { + content => "hello world", +} +file "/tmp/foo" { + content => fmt.printf("hello world"), +} + +# these two resources are compatible with each other, so we should allow it +pkg "cowsay" { + state => "installed", +} +pkg "cowsay" { + state => "newest", +}