mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-02 14:01:20 -03:00
Merge branch 'master' into death_of_fishd
This commit is contained in:
@@ -688,6 +688,9 @@ static void test_parser()
|
||||
parser_t::principal_parser().eval(L"function recursive1 ; recursive2 ; end ; function recursive2 ; recursive1 ; end ; recursive1; ", io_chain_t(), TOP);
|
||||
#endif
|
||||
|
||||
say(L"Testing empty function name");
|
||||
parser_t::principal_parser().eval(L"function '' ; echo fail; exit 42 ; end ; ''", io_chain_t(), TOP);
|
||||
|
||||
say(L"Testing eval_args");
|
||||
completion_list_t comps;
|
||||
parser_t::principal_parser().expand_argument_list(L"alpha 'beta gamma' delta", comps);
|
||||
@@ -1022,28 +1025,23 @@ static void test_wchar2utf8(const wchar_t *src, size_t slen, const char *dst, si
|
||||
}
|
||||
}
|
||||
|
||||
do
|
||||
size = wchar_to_utf8(src, slen, mem, dlen, flags);
|
||||
if (res != size)
|
||||
{
|
||||
size = wchar_to_utf8(src, slen, mem, dlen, flags);
|
||||
if (res != size)
|
||||
{
|
||||
err(L"w2u: %s: FAILED (rv: %lu, must be %lu)", descr, size, res);
|
||||
break;
|
||||
}
|
||||
|
||||
if (mem == NULL)
|
||||
break; /* OK */
|
||||
|
||||
if (memcmp(mem, dst, size) != 0)
|
||||
{
|
||||
err(L"w2u: %s: BROKEN", descr);
|
||||
break;
|
||||
}
|
||||
|
||||
err(L"w2u: %s: FAILED (rv: %lu, must be %lu)", descr, size, res);
|
||||
goto finish;
|
||||
}
|
||||
while (0);
|
||||
|
||||
if (mem != NULL);
|
||||
if (mem == NULL)
|
||||
goto finish; /* OK */
|
||||
|
||||
if (memcmp(mem, dst, size) != 0)
|
||||
{
|
||||
err(L"w2u: %s: BROKEN", descr);
|
||||
goto finish;
|
||||
}
|
||||
|
||||
finish:
|
||||
free(mem);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user