diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-04-11 20:03:39 +0200 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2018-08-24 16:47:08 +0200 |
commit | b616ac0d2b6b6e27e41646f8e6c9d62a1567141c (patch) | |
tree | 0652a00d95eb74da6787b399a044f05276637a8a /src/test/meson.build | |
parent | ff3669adbfbfff7f8a7c95cd60f27e7ac5142ee7 (diff) |
basic: add minimalistic table formatter
We have plenty of code in our codebase that outputs tables to the
console, and all is homegrown and awful. Let's replace it with a generic
implementation that can do automatically what the old implementations
did manually.
Features:
1. Ellipsation (for fields overly long) and alignment (for
fields overly short)
2. Sorting of rows
3. automatically copies formatting from the same cell in the row above
4. Heavy use of varargs to make putting together tables easy
5. can expand and compress tables, with weights
6. Has a minimal understanding of unicode wide characters in order to
match unicode strings to character cell terminals.
7. Columns can be reordered and individually turned off.
8. pretty printing for various data types
And more.
Diffstat (limited to 'src/test/meson.build')
-rw-r--r-- | src/test/meson.build | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/src/test/meson.build b/src/test/meson.build index 2585bb3fa..833634ffa 100644 --- a/src/test/meson.build +++ b/src/test/meson.build @@ -1,19 +1,6 @@ # SPDX-License-Identifier: LGPL-2.1+ # # Copyright 2017 Zbigniew Jędrzejewski-Szmek -# -# systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2.1 of the License, or -# (at your option) any later version. -# -# systemd is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with systemd; If not, see <http://www.gnu.org/licenses/>. awkscript = 'test-hashmap-ordered.awk' test_hashmap_ordered_c = custom_target( @@ -203,6 +190,10 @@ tests += [ [], []], + [['src/test/test-format-table.c'], + [], + []], + #if 0 /// UNNEEDED in elogind # [['src/test/test-ratelimit.c'], # [], |