(t *testing.T)
| 151 | } |
| 152 | |
| 153 | func TestComposeWithCommentsWithNewlines(t *testing.T) { |
| 154 | g := baseGraph() |
| 155 | a, c := baseAttrsAndConfig() |
| 156 | // comments that could be added with the -add_comment command line tool |
| 157 | // the first label is used as the dot "node name"; the others are escaped as labels |
| 158 | c.Labels = []string{"comment line 1\ncomment line 2 \"unterminated double quote", `second comment "double quote"`} |
| 159 | |
| 160 | var buf bytes.Buffer |
| 161 | ComposeDot(&buf, g, a, c) |
| 162 | |
| 163 | compareGraphs(t, buf.Bytes(), "compose9.dot") |
| 164 | } |
| 165 | |
| 166 | func baseGraph() *Graph { |
| 167 | src := &Node{ |
nothing calls this directly
no test coverage detected
searching dependent graphs…