Move the empty function test to tests.

This commit is contained in:
Konrad Borowski 2014-05-06 12:31:44 +02:00
parent 91ebe12fc2
commit 7f2c4cbf8a
5 changed files with 3 additions and 9 deletions

View file

@ -687,6 +687,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);

View file

@ -1,4 +0,0 @@
function: No function name given
fish: function ""
^

View file

@ -1,3 +0,0 @@
function ""
end
echo Hello, world!

View file

@ -1 +0,0 @@
Hello, world!

View file

@ -1 +0,0 @@
0