Lines Matching full:text
29 #include "utils/text/table.hpp"
35 #include "utils/text/operations.ipp"
37 namespace text = utils::text;
40 /// Performs a check on text::table_formatter.
57 const text::table_formatter& formatter, in table_formatter_check()
58 const text::table& table) in table_formatter_check()
60 ATF_REQUIRE_EQ(expected, text::join(formatter.format(table), "\n") + "\n"); in table_formatter_check()
68 ATF_REQUIRE_EQ(5, text::table(5).ncolumns()); in ATF_TEST_CASE_BODY()
69 ATF_REQUIRE_EQ(10, text::table(10).ncolumns()); in ATF_TEST_CASE_BODY()
76 text::table_row row1; in ATF_TEST_CASE_BODY()
79 text::table_row row2; in ATF_TEST_CASE_BODY()
83 text::table table(2); in ATF_TEST_CASE_BODY()
95 text::table_row row1; in ATF_TEST_CASE_BODY()
98 text::table_row row2; in ATF_TEST_CASE_BODY()
102 text::table table(2); in ATF_TEST_CASE_BODY()
114 text::table table(2); in ATF_TEST_CASE_BODY()
116 table.add_row(text::table_row(2)); in ATF_TEST_CASE_BODY()
124 text::table_row row1; in ATF_TEST_CASE_BODY()
126 text::table_row row2; in ATF_TEST_CASE_BODY()
129 text::table table(1); in ATF_TEST_CASE_BODY()
133 text::table::const_iterator iter = table.begin(); in ATF_TEST_CASE_BODY()
147 ATF_REQUIRE(text::table_formatter().set_separator(" ") in ATF_TEST_CASE_BODY()
148 .format(text::table(1)).empty()); in ATF_TEST_CASE_BODY()
149 ATF_REQUIRE(text::table_formatter().set_separator(" ") in ATF_TEST_CASE_BODY()
150 .format(text::table(10)).empty()); in ATF_TEST_CASE_BODY()
157 text::table table(3); in ATF_TEST_CASE_BODY()
159 text::table_row row; in ATF_TEST_CASE_BODY()
166 text::table_row row; in ATF_TEST_CASE_BODY()
167 row.push_back("Fourth with some text"); in ATF_TEST_CASE_BODY()
168 row.push_back("Fifth with some more text"); in ATF_TEST_CASE_BODY()
176 text::table_formatter(), table); in ATF_TEST_CASE_BODY()
183 text::table table(1); in ATF_TEST_CASE_BODY()
185 text::table_row row; in ATF_TEST_CASE_BODY()
190 text::table_row row; in ATF_TEST_CASE_BODY()
198 text::table_formatter().set_separator(" | "), table); in ATF_TEST_CASE_BODY()
205 text::table table(1); in ATF_TEST_CASE_BODY()
207 text::table_row row; in ATF_TEST_CASE_BODY()
212 text::table_row row; in ATF_TEST_CASE_BODY()
220 text::table_formatter().set_separator(" | ").set_column_width(0, 1024), in ATF_TEST_CASE_BODY()
228 text::table table(1); in ATF_TEST_CASE_BODY()
230 text::table_row row; in ATF_TEST_CASE_BODY()
235 text::table_row row; in ATF_TEST_CASE_BODY()
243 text::table_formatter().set_separator(" | ").set_table_width(11), in ATF_TEST_CASE_BODY()
251 text::table table(3); in ATF_TEST_CASE_BODY()
253 text::table_row row; in ATF_TEST_CASE_BODY()
260 text::table_row row; in ATF_TEST_CASE_BODY()
261 row.push_back("Fourth with some text"); in ATF_TEST_CASE_BODY()
262 row.push_back("Fifth with some more text"); in ATF_TEST_CASE_BODY()
269 "Fourth with some text | Fifth with some more text | Sixth foo\n", in ATF_TEST_CASE_BODY()
270 text::table_formatter().set_separator(" | "), table); in ATF_TEST_CASE_BODY()
277 text::table table(3); in ATF_TEST_CASE_BODY()
279 text::table_row row; in ATF_TEST_CASE_BODY()
286 text::table_row row; in ATF_TEST_CASE_BODY()
287 row.push_back("Fourth with some text"); in ATF_TEST_CASE_BODY()
288 row.push_back("Fifth with some more text"); in ATF_TEST_CASE_BODY()
295 "Fourth with some text | Fifth with some more text | Sixth foo\n", in ATF_TEST_CASE_BODY()
296 text::table_formatter().set_separator(" | ").set_column_width(0, 23) in ATF_TEST_CASE_BODY()
304 text::table table(3); in ATF_TEST_CASE_BODY()
306 text::table_row row; in ATF_TEST_CASE_BODY()
313 text::table_row row; in ATF_TEST_CASE_BODY()
314 row.push_back("Fourth with some text"); in ATF_TEST_CASE_BODY()
315 row.push_back("Fifth with some more text"); in ATF_TEST_CASE_BODY()
322 "Fourth with some text | Fifth with | Sixth foo\n" in ATF_TEST_CASE_BODY()
324 " | text | \n", in ATF_TEST_CASE_BODY()
325 text::table_formatter().set_separator(" | ").set_table_width(46) in ATF_TEST_CASE_BODY()
326 .set_column_width(1, text::table_formatter::width_refill) in ATF_TEST_CASE_BODY()
327 .set_column_width(0, text::table_formatter::width_auto), table); in ATF_TEST_CASE_BODY()
331 "Fourth with some text | Fifth with | Sixth foo\n" in ATF_TEST_CASE_BODY()
333 " | text | \n", in ATF_TEST_CASE_BODY()
334 text::table_formatter().set_separator(" | ").set_table_width(48) in ATF_TEST_CASE_BODY()
335 .set_column_width(1, text::table_formatter::width_refill) in ATF_TEST_CASE_BODY()
343 text::table options_table(2); in ATF_TEST_CASE_BODY()
345 text::table_row row; in ATF_TEST_CASE_BODY()
351 text::table_row row; in ATF_TEST_CASE_BODY()
353 row.push_back("And this is the text for the second flag"); in ATF_TEST_CASE_BODY()
357 text::table commands_table(2); in ATF_TEST_CASE_BODY()
359 text::table_row row; in ATF_TEST_CASE_BODY()
365 text::table_row row; in ATF_TEST_CASE_BODY()
371 const text::widths_vector::value_type first_width = in ATF_TEST_CASE_BODY()
377 "-b And this is the text for\n" in ATF_TEST_CASE_BODY()
379 text::table_formatter().set_separator(" ").set_table_width(36) in ATF_TEST_CASE_BODY()
381 .set_column_width(1, text::table_formatter::width_refill), in ATF_TEST_CASE_BODY()
389 text::table_formatter().set_separator(" ").set_table_width(36) in ATF_TEST_CASE_BODY()
391 .set_column_width(1, text::table_formatter::width_refill), in ATF_TEST_CASE_BODY()