]>
git.ipfire.org Git - thirdparty/systemd.git/blob - src/test/test-qrcode-util.c
c4e2894eb712ffb0fcb91e5294cb2fa3700ec902
1 /* SPDX-License-Identifier: LGPL-2.1+ */
3 #include "locale-util.h"
5 #include "qrcode-util.h"
8 static int run(int argc
, char **argv
) {
11 test_setup_logging(LOG_DEBUG
);
13 assert_se(setenv("SYSTEMD_COLORS", "1", 1) == 0); /* Force the qrcode to be printed */
15 r
= print_qrcode(stdout
, "This should say \"TEST\"", "TEST");
17 return log_tests_skipped("not supported");
19 return log_error_errno(r
, "Failed to print QR code: %m");
23 DEFINE_MAIN_FUNCTION(run
);