1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-25 10:04:04 +03:00

test: add simple test for two common kind of errors

This commit is contained in:
Lennart Poettering 2023-10-12 15:28:06 +02:00
parent efe511e910
commit 5d2ea9b5cf

View File

@ -152,6 +152,12 @@ TEST(parse) {
assert_se(varlink_idl_parse(text, NULL, NULL, &parsed) >= 0);
test_parse_format_one(parsed);
assert_se(varlink_idl_parse("interface org.freedesktop.Foo\n"
"type Foo (b: bool, c: foo, c: int)", NULL, NULL, NULL) == -ENETUNREACH); /* unresolved type */
assert_se(varlink_idl_parse("interface org.freedesktop.Foo\n"
"type Foo ()", NULL, NULL, NULL) == -EBADMSG); /* empty struct/enum */
}
TEST(interface_name_is_valid) {