diff options
Diffstat (limited to 'contrib/libxo/tests/core/test_01.c')
-rw-r--r-- | contrib/libxo/tests/core/test_01.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/contrib/libxo/tests/core/test_01.c b/contrib/libxo/tests/core/test_01.c index f7fe61e..05d778a 100644 --- a/contrib/libxo/tests/core/test_01.c +++ b/contrib/libxo/tests/core/test_01.c @@ -79,6 +79,18 @@ main (int argc, char **argv) xo_open_container_h(NULL, "top"); + xo_emit("testing argument modifier {a:}.{a:}...\n", + "host", "my-box", "domain", "example.com"); + + xo_emit("testing argument modifier with encoding to {ea:}.{a:}...\n", + "host", "my-box", "domain", "example.com"); + + xo_emit("{La:} {a:}\n", "Label text", "label", "value"); + + xo_emit_field("Vt", "max-chaos", NULL, NULL, " very "); + xo_emit_field("V", "min-chaos", "%d", NULL, 42); + xo_emit_field("V", "some-chaos", "%d\n", "[%d]", 42); + xo_emit("Connecting to {:host}.{:domain}...\n", "my-box", "example.com"); xo_attr("test", "value"); @@ -169,6 +181,16 @@ main (int argc, char **argv) xo_emit("X{P: }X{Lwc:Cost}{:cost/%u}\n", 425); xo_emit("X{P:/%30s}X{Lwc:Cost}{:cost/%u}\n", "", 455); + xo_emit("{e:mode/%s}{e:mode_octal/%s} {t:links/%s} " + "{t:user/%s} {t:group/%s} \n", + "mode", "octal", "links", + "user", "group", "extra1", "extra2", "extra3"); + + xo_emit("{t:mode/%s}{e:mode_octal/%03o} {t:links/%*u} " + "{t:user/%-*s} {t:group/%-*s} \n", + "/some/file", (int) 0640, 8, 1, + 10, "user", 12, "group"); + xo_close_container_h(NULL, "top"); xo_finish(); |