/* SPDX-License-Identifier: LGPL-2.1-or-later */
+#include "sd-id128.h"
+
#include "alloc-util.h"
#include "log.h"
#include "specifier.h"
}
}
+/* Bunch of specifiers that are not part of the common lists */
+TEST(specifiers_assorted) {
+ const sd_id128_t id = SD_ID128_ALLF;
+ const uint64_t llu = UINT64_MAX;
+ const Specifier table[] = {
+ /* Used in src/partition/repart.c */
+ { 'a', specifier_uuid, &id },
+ { 'b', specifier_uint64, &llu },
+ {}
+ };
+
+ for (const Specifier *s = table; s->specifier; s++) {
+ char spec[3];
+ _cleanup_free_ char *resolved = NULL;
+ int r;
+
+ xsprintf(spec, "%%%c", s->specifier);
+
+ r = specifier_printf(spec, SIZE_MAX, table, NULL, NULL, &resolved);
+ assert_se(r >= 0);
+
+ log_info("%%%c → %s", s->specifier, resolved);
+ }
+}
+
TEST(specifiers_missing_data_ok) {
_cleanup_free_ char *resolved = NULL;