macro_f_string_static_t_initialize_1("/z/../b/c", 0, 9),
macro_f_string_static_t_initialize_1("/z/../b/c/", 0, 10),
macro_f_string_static_t_initialize_1("/z/../b/c//", 0, 11),
+ macro_f_string_static_t_initialize_1("/z/.\0./b/c//", 0, 12),
+ macro_f_string_static_t_initialize_1("/z\0/.\0./b/c/\0/", 0, 14),
+ macro_f_string_static_t_initialize_1("\0a/../", 0, 6),
+ macro_f_string_static_t_initialize_1("a/../\0", 0, 6),
};
const f_string_static_t expected[] = {
macro_f_string_static_t_initialize_1("/b/c", 0, 4),
macro_f_string_static_t_initialize_1("/b/c", 0, 4),
macro_f_string_static_t_initialize_1("/b/c", 0, 4),
+ macro_f_string_static_t_initialize_1("/b/c", 0, 4),
+ macro_f_string_static_t_initialize_1("/b/c", 0, 4),
+ macro_f_string_static_t_initialize_1("", 0, 0),
+ macro_f_string_static_t_initialize_1("", 0, 0),
};
const uint8_t prepend[] = {
F_false,
F_false,
F_false,
+ F_false,
+ F_false,
+ F_true,
+ F_true,
};
f_string_dynamic_t path = f_string_dynamic_t_initialize;
- for (uint8_t i = 0; i < 24; ++i) {
+ for (uint8_t i = 0; i < 28; ++i) {
+
+ path.used = 0;
const f_status_t status = fl_path_canonical(contents[i], &path);
f_char_t prepended_string[pwd_length + expected[i].used + 2];
f_string_static_t prepended = macro_f_string_static_t_initialize_1(prepended_string, 0, pwd_length + expected[i].used);
- prepended_string[prepended.used] = 0;
- prepended_string[prepended.used + 1] = 0;
+ memset(prepended_string, 0, pwd_length + expected[i].used + 2);
if (pwd_length) {
memcpy(prepended_string, pwd, pwd_length);
macro_f_string_static_t_initialize_1(".//a/b", 0, 6),
macro_f_string_static_t_initialize_1(".//a/b/", 0, 7),
macro_f_string_static_t_initialize_1(".//a/b//", 0, 8),
+ macro_f_string_static_t_initialize_1(".//a/\0b//", 0, 9),
+ macro_f_string_static_t_initialize_1(".\0//a/\0b/\0/", 0, 11),
+ macro_f_string_static_t_initialize_1("\0a", 0, 2),
+ macro_f_string_static_t_initialize_1("a\0", 0, 2),
};
const f_string_static_t expected[] = {
macro_f_string_static_t_initialize_1("a/b", 0, 3),
macro_f_string_static_t_initialize_1("a/b", 0, 3),
macro_f_string_static_t_initialize_1("a/b", 0, 3),
+ macro_f_string_static_t_initialize_1("a/b", 0, 3),
+ macro_f_string_static_t_initialize_1("a/b", 0, 3),
+ macro_f_string_static_t_initialize_1("a", 0, 1),
+ macro_f_string_static_t_initialize_1("a", 0, 1),
};
f_string_dynamic_t path = f_string_dynamic_t_initialize;
- for (uint8_t i = 0; i < 18; ++i) {
+ for (uint8_t i = 0; i < 22; ++i) {
+
+ path.used = 0;
const f_status_t status = fl_path_canonical(contents[i], &path);
f_char_t prepended_string[pwd_length + expected[i].used + 2];
f_string_static_t prepended = macro_f_string_static_t_initialize_1(prepended_string, 0, pwd_length + expected[i].used);
- prepended_string[prepended.used] = 0;
- prepended_string[prepended.used + 1] = 0;
+ memset(prepended_string, 0, pwd_length + expected[i].used + 2);
if (pwd_length) {
memcpy(prepended_string, pwd, pwd_length);
macro_f_string_static_t_initialize_1("/a/b//", 0, 6),
macro_f_string_static_t_initialize_1("//a/b//", 0, 7),
macro_f_string_static_t_initialize_1("///a/b//", 0, 8),
+ macro_f_string_static_t_initialize_1("///a/\0b//", 0, 9),
+ macro_f_string_static_t_initialize_1("/\0//a/\0b\0//", 0, 11),
+ macro_f_string_static_t_initialize_1("\0/", 0, 2),
+ macro_f_string_static_t_initialize_1("/\0", 0, 2),
};
const f_string_static_t expected[] = {
macro_f_string_static_t_initialize_1("/a/b", 0, 4),
macro_f_string_static_t_initialize_1("/a/b", 0, 4),
macro_f_string_static_t_initialize_1("/a/b", 0, 4),
+ macro_f_string_static_t_initialize_1("/a/b", 0, 4),
+ macro_f_string_static_t_initialize_1("/a/b", 0, 4),
+ macro_f_string_static_t_initialize_1("/", 0, 1),
+ macro_f_string_static_t_initialize_1("/", 0, 1),
};
f_string_dynamic_t path = f_string_dynamic_t_initialize;
- for (uint8_t i = 0; i < 18; ++i) {
+ for (uint8_t i = 0; i < 22; ++i) {
+
+ path.used = 0;
const f_status_t status = fl_path_canonical(contents[i], &path);
macro_f_string_static_t_initialize_1("//a/~/b", 0, 7),
macro_f_string_static_t_initialize_1("//a/~b", 0, 6),
macro_f_string_static_t_initialize_1("//a/~b/c", 0, 8),
+ macro_f_string_static_t_initialize_1("//a/~\0b/c", 0, 9),
+ macro_f_string_static_t_initialize_1("/\0/a/~\0b\0/c", 0, 11),
+ macro_f_string_static_t_initialize_1("\0~", 0, 2),
+ macro_f_string_static_t_initialize_1("~\0", 0, 2),
};
const f_string_static_t expected[] = {
macro_f_string_static_t_initialize_1("/a/~/b", 0, 6),
macro_f_string_static_t_initialize_1("/a/~b", 0, 5),
macro_f_string_static_t_initialize_1("/a/~b/c", 0, 7),
+ macro_f_string_static_t_initialize_1("/a/~b/c", 0, 7),
+ macro_f_string_static_t_initialize_1("/a/~b/c", 0, 7),
+ macro_f_string_static_t_initialize_1("~", 0, 1),
+ macro_f_string_static_t_initialize_1("~", 0, 1),
};
const uint8_t prepend[] = {
F_false,
F_false,
F_false,
+ F_false,
+ F_false,
+ F_true,
+ F_true,
};
f_string_dynamic_t path = f_string_dynamic_t_initialize;
- for (uint8_t i = 0; i < 23; ++i) {
+ for (uint8_t i = 0; i < 27; ++i) {
+
+ path.used = 0;
const f_status_t status = fl_path_canonical(contents[i], &path);
f_char_t prepended_string[pwd_length + expected[i].used + 2];
f_string_static_t prepended = macro_f_string_static_t_initialize_1(prepended_string, 0, pwd_length + expected[i].used);
- prepended_string[prepended.used] = 0;
- prepended_string[prepended.used + 1] = 0;
+ memset(prepended_string, 0, pwd_length + expected[i].used + 2);
if (pwd_length) {
memcpy(prepended_string, pwd, pwd_length);