tests: fix -Winvalid-source-encoding warnings in path_recode

Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
This commit is contained in:
Yury V. Zaytsev 2024-09-30 09:41:19 +02:00
parent 5779e51e69
commit 22b80bf2d4

View File

@ -99,14 +99,14 @@ static const struct test_path_recode_ds
{ {
{ /* 0. */ { /* 0. */
"UTF-8", "UTF-8",
"/тестовый/путь", "/\xD4\xC5\xD3\xD4\xCF\xD7\xD9\xCA/\xD0\xD5\xD4\xD8",
"/тестовый/путь", "/\xD4\xC5\xD3\xD4\xCF\xD7\xD9\xCA/\xD0\xD5\xD4\xD8",
"/тестовый/путь" "/\xD4\xC5\xD3\xD4\xCF\xD7\xD9\xCA/\xD0\xD5\xD4\xD8"
}, },
{ /* 1. */ { /* 1. */
"UTF-8", "UTF-8",
"/#enc:KOI8-R/тестовый/путь", "/#enc:KOI8-R/тестовый/путь",
"/тестовый/путь", "/\xD4\xC5\xD3\xD4\xCF\xD7\xD9\xCA/\xD0\xD5\xD4\xD8",
"/#enc:KOI8-R/тестовый/путь" "/#enc:KOI8-R/тестовый/путь"
}, },
{ /* 2. */ { /* 2. */
@ -117,9 +117,9 @@ static const struct test_path_recode_ds
}, },
{ /* 3. */ { /* 3. */
"KOI8-R", "KOI8-R",
"/#enc:UTF-8/тестовый/путь", "/#enc:UTF-8/\xD4\xC5\xD3\xD4\xCF\xD7\xD9\xCA/\xD0\xD5\xD4\xD8",
"/тестовый/путь", "/тестовый/путь",
"/#enc:UTF-8/тестовый/путь" "/#enc:UTF-8/\xD4\xC5\xD3\xD4\xCF\xD7\xD9\xCA/\xD0\xD5\xD4\xD8"
}, },
{ /* 4. Test encode info at start */ { /* 4. Test encode info at start */
"UTF-8", "UTF-8",
@ -190,13 +190,13 @@ static const struct test_path_to_str_flags_ds
"/test1://user:passwd@host.name/#enc:KOI8-R/тестовый/путь", "/test1://user:passwd@host.name/#enc:KOI8-R/тестовый/путь",
VPF_NONE, VPF_NONE,
VPF_RECODE, VPF_RECODE,
"/test1://user:passwd@host.name/тестовый/путь" "/test1://user:passwd@host.name/\xD4\xC5\xD3\xD4\xCF\xD7\xD9\xCA/\xD0\xD5\xD4\xD8"
}, },
{ /* 3. */ { /* 3. */
"/test1://user:passwd@host.name/#enc:KOI8-R/тестовый/путь", "/test1://user:passwd@host.name/#enc:KOI8-R/тестовый/путь",
VPF_NONE, VPF_NONE,
VPF_RECODE | VPF_STRIP_PASSWORD, VPF_RECODE | VPF_STRIP_PASSWORD,
"/test1://user@host.name/тестовый/путь" "/test1://user@host.name/\xD4\xC5\xD3\xD4\xCF\xD7\xD9\xCA/\xD0\xD5\xD4\xD8"
}, },
{ /* 4. */ { /* 4. */
"/mock/home/test/dir", "/mock/home/test/dir",
@ -220,13 +220,13 @@ static const struct test_path_to_str_flags_ds
"/mock/home/test1://user:passwd@host.name/#enc:KOI8-R/тестовый/путь", "/mock/home/test1://user:passwd@host.name/#enc:KOI8-R/тестовый/путь",
VPF_NONE, VPF_NONE,
VPF_STRIP_HOME | VPF_RECODE, VPF_STRIP_HOME | VPF_RECODE,
"~/test1://user:passwd@host.name/тестовый/путь" "~/test1://user:passwd@host.name/\xD4\xC5\xD3\xD4\xCF\xD7\xD9\xCA/\xD0\xD5\xD4\xD8"
}, },
{ /* 8. */ { /* 8. */
"/mock/home/test1://user:passwd@host.name/#enc:KOI8-R/тестовый/путь", "/mock/home/test1://user:passwd@host.name/#enc:KOI8-R/тестовый/путь",
VPF_NONE, VPF_NONE,
VPF_STRIP_HOME | VPF_RECODE | VPF_STRIP_PASSWORD, VPF_STRIP_HOME | VPF_RECODE | VPF_STRIP_PASSWORD,
"~/test1://user@host.name/тестовый/путь" "~/test1://user@host.name/\xD4\xC5\xD3\xD4\xCF\xD7\xD9\xCA/\xD0\xD5\xD4\xD8"
}, },
}; };
/* *INDENT-ON* */ /* *INDENT-ON* */