Files
mgmt/lang/interpret_test/TestAstFunc2/empty-edge-list-0.txtar
James Shubin 8fffd10280 lang: Port TestAstFunc2 to txtar format
This ports TestAstFunc2 from our home-grown content storage system to
the txtar package. Since a single file can be used to represent the
entire folder hierarchy, this makes it much easier to see and edit
tests.
2023-06-01 16:56:44 -04:00

39 lines
1.1 KiB
Plaintext

-- main.mcl --
# this must pass type unification and generate output
# single resource
test "name" {}
# single resource, defined by list variable
$names = ["hey", "there",]
test $names {}
# multiples resources, defined by list
test ["hello", "world",] {
Depend => Test[$names],
}
$morenames = ["wow", "cool", "amazing",]
test $morenames {}
Test[$names] -> Test[$morenames]
-- OUTPUT --
Edge: test[hey] -> test[amazing] # test[hey] -> test[amazing]
Edge: test[hey] -> test[cool] # test[hey] -> test[cool]
Edge: test[hey] -> test[hello] # test[hey] -> test[hello]
Edge: test[hey] -> test[world] # test[hey] -> test[world]
Edge: test[hey] -> test[wow] # test[hey] -> test[wow]
Edge: test[there] -> test[amazing] # test[there] -> test[amazing]
Edge: test[there] -> test[cool] # test[there] -> test[cool]
Edge: test[there] -> test[hello] # test[there] -> test[hello]
Edge: test[there] -> test[world] # test[there] -> test[world]
Edge: test[there] -> test[wow] # test[there] -> test[wow]
Vertex: test[amazing]
Vertex: test[cool]
Vertex: test[hello]
Vertex: test[hey]
Vertex: test[name]
Vertex: test[there]
Vertex: test[world]
Vertex: test[wow]