summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2019-07-16 12:45:13 +0200
committerLennart Poettering <lennart@poettering.net>2019-07-16 12:45:13 +0200
commit8792cecc1f27b46a81bca9a760a854b533a926ef (patch)
tree2b2520055975e8f55fec6825f49f796a4bbca52d /src/test
parent6268974f886ce1a6a63b67c3b0aa5ede586a6b0e (diff)
downloadsystemd-8792cecc1f27b46a81bca9a760a854b533a926ef.tar.gz
systemd-8792cecc1f27b46a81bca9a760a854b533a926ef.tar.bz2
systemd-8792cecc1f27b46a81bca9a760a854b533a926ef.zip
format-table: add some minimal testing for new table_add_many() features
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test-format-table.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/test/test-format-table.c b/src/test/test-format-table.c
index a8b6e1ffe3..def9cbda2f 100644
--- a/src/test/test-format-table.c
+++ b/src/test/test-format-table.c
@@ -49,6 +49,7 @@ int main(int argc, char *argv[]) {
assert_se(table_add_many(t,
TABLE_STRING, "a long field",
TABLE_STRING, "yyy",
+ TABLE_SET_UPPERCASE, 1,
TABLE_BOOLEAN, false) >= 0);
assert_se(table_format(t, &formatted) >= 0);
@@ -57,7 +58,7 @@ int main(int argc, char *argv[]) {
assert_se(streq(formatted,
"ONE TWO THREE\n"
"xxx yyy yes\n"
- "a long field yyy no\n"));
+ "a long field YYY no\n"));
formatted = mfree(formatted);
@@ -69,7 +70,7 @@ int main(int argc, char *argv[]) {
assert_se(streq(formatted,
"ONE TWO THREE\n"
"xxx yyy yes\n"
- "a long field yyy no\n"));
+ "a long field YYY no\n"));
formatted = mfree(formatted);
@@ -80,7 +81,7 @@ int main(int argc, char *argv[]) {
assert_se(streq(formatted,
"ONE TWO THR…\n"
"xxx yyy yes\n"
- "a … yyy no\n"));
+ "a … YYY no\n"));
formatted = mfree(formatted);
@@ -114,7 +115,7 @@ int main(int argc, char *argv[]) {
assert_se(streq(formatted,
"ONE TWO THREE\n"
- "a long field yyy no\n"
+ "a long field YYY no\n"
"xxx yyy yes\n"));
formatted = mfree(formatted);
@@ -140,7 +141,7 @@ int main(int argc, char *argv[]) {
printf("%s\n", formatted);
assert_se(streq(formatted,
- "a long field yyy no\n"
+ "a long field YYY no\n"
"fäää zzz no\n"
"fäää uuu yes\n"
"xxx yyy yes\n"