Lines Matching refs:test_dns_label_unescape_suffix_one
113 static void test_dns_label_unescape_suffix_one(const char *what, const char *expect1, const char *expect2, size_t buffer_sz, int ret1, int ret2) {
132 test_dns_label_unescape_suffix_one("hallo", "hallo", "", 6, 5, 0);
133 test_dns_label_unescape_suffix_one("hallo", "hallo", "", 4, -ENOBUFS, -ENOBUFS);
134 test_dns_label_unescape_suffix_one("", "", "", 10, 0, 0);
135 test_dns_label_unescape_suffix_one("hallo\\.foobar", "hallo.foobar", "", 20, 12, 0);
136 test_dns_label_unescape_suffix_one("hallo.foobar", "foobar", "hallo", 10, 6, 5);
137 test_dns_label_unescape_suffix_one("hallo.foobar\n", "foobar", "foobar", 20, -EINVAL, -EINVAL);
138 test_dns_label_unescape_suffix_one("hallo\\", "hallo", "hallo", 20, -EINVAL, -EINVAL);
139 test_dns_label_unescape_suffix_one("hallo\\032 ", "hallo ", "", 20, 7, 0);
140 test_dns_label_unescape_suffix_one(".", "", "", 20, 0, 0);
141 test_dns_label_unescape_suffix_one("..", "", "", 20, 0, -EINVAL);
142 test_dns_label_unescape_suffix_one(".foobar", "foobar", "", 20, 6, -EINVAL);
143 test_dns_label_unescape_suffix_one("foobar.", "foobar", "", 20, 6, 0);
144 test_dns_label_unescape_suffix_one("foo\\\\bar", "foo\\bar", "", 20, 7, 0);
145 test_dns_label_unescape_suffix_one("foo.bar", "bar", "foo", 20, 3, 3);
146 test_dns_label_unescape_suffix_one("foo..bar", "bar", "", 20, 3, -EINVAL);
147 test_dns_label_unescape_suffix_one("foo...bar", "bar", "", 20, 3, -EINVAL);
148 test_dns_label_unescape_suffix_one("foo\\.bar", "foo.bar", "", 20, 7, 0);
149 test_dns_label_unescape_suffix_one("foo\\\\.bar", "bar", "foo\\", 20, 3, 4);
150 test_dns_label_unescape_suffix_one("foo\\\\\\.bar", "foo\\.bar", "", 20, 8, 0);