| 1 |
/** |
| 2 |
* @file |
| 3 |
* @brief supporting code for testing empty label behavior |
| 4 |
* |
| 5 |
* https://gitlab.com/graphviz/graphviz/-/issues/1887 |
| 6 |
*/ |
| 7 |
|
| 8 |
#include <assert.h> |
| 9 |
#include <graphviz/cgraph.h> |
| 10 |
#include <stddef.h> |
| 11 |
#include <stdio.h> |
| 12 |
|
| 13 |
int main(void) { |
| 14 |
|
| 15 |
Agraph_t *root = agopen("graphname", Agdirected, NULL); |
| 16 |
agattr_text(root, 1, "label", ""); |
| 17 |
Agnode_t *before = agnode(root, "before", 1); |
| 18 |
assert(before != NULL); |
| 19 |
Agnode_t *after = agnode(root, "after", 1); |
| 20 |
assert(after != NULL); |
| 21 |
(void)after; |
| 22 |
agset(before, "label", "1"); |
| 23 |
|
| 24 |
agwrite(root, stdout); |
| 25 |
|
| 26 |
agclose(root); |
| 27 |
|
| 28 |
return 0; |
| 29 |
} |