mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 13:39:02 +00:00
fix a memory leak in profiling, add a profiling test
This commit is contained in:
parent
44f70d2b52
commit
640beafa8c
2 changed files with 7 additions and 1 deletions
|
@ -2460,7 +2460,7 @@ void parser_t::eval_job(tokenizer_t *tok)
|
||||||
if (do_profile)
|
if (do_profile)
|
||||||
{
|
{
|
||||||
t2 = get_time();
|
t2 = get_time();
|
||||||
profile_item->cmd = wcsdup(j->command_wcstr());
|
profile_item->cmd = j->command();
|
||||||
profile_item->skipped=current_block->skip;
|
profile_item->skipped=current_block->skip;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,12 @@ if [ "$argv" != '-n' ]
|
||||||
echo Exit status differs for file test.fish
|
echo Exit status differs for file test.fish
|
||||||
end
|
end
|
||||||
|
|
||||||
|
../fish -p /dev/null -c 'echo testing' >/dev/null
|
||||||
|
if test $status -ne 0
|
||||||
|
set res fail
|
||||||
|
echo Profiling fails
|
||||||
|
end
|
||||||
|
|
||||||
if test $res = ok;
|
if test $res = ok;
|
||||||
echo File test.fish tested ok
|
echo File test.fish tested ok
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue