lang: Output of tests should also show autogrouped resources

This makes our test cases slightly more complete.
This commit is contained in:
James Shubin
2023-12-08 18:25:54 -05:00
parent 18e1f08156
commit 8fcaa4abf2
2 changed files with 4 additions and 1 deletions

View File

@@ -2165,7 +2165,7 @@ func TestAstFunc3(t *testing.T) {
}
// stringResFields is a helper function to store a resource graph as a text
// format for test comparisons.
// format for test comparisons. This also adds a line for each vertex as well!
func stringResFields(res engine.Res) (string, error) {
m, err := engineUtil.ResToParamValues(res)
if err != nil {
@@ -2191,6 +2191,8 @@ func stringResFields(res engine.Res) (string, error) {
if err != nil {
return "", err
}
s += fmt.Sprintf("Vertex: %s\n", x) // add one for the res itself!
// add a prefix to each line?
s = strings.Trim(s, "\n") // trim trailing newlines
for _, f := range strings.Split(s, "\n") {