Fix compilation issue in test suite,. Thanks to Martin Bähr for the report.

darcs-hash:20061010224721-ac50b-0bd07f325c2026d991cf9535941060fadd5869cb.gz
This commit is contained in:
axel 2006-10-11 08:47:21 +10:00
parent c4f3b5e9ef
commit afaf156a42

View file

@ -484,43 +484,43 @@ static void test_parser()
say( L"Testing null input to parser" );
if( !parser_test( 0, 0, 0 ) )
if( !parser_test( 0, 0, 0, 0 ) )
{
err( L"Null input to parser_test undetected" );
}
say( L"Testing block nesting" );
if( !parser_test( L"if; end", 0, 0 ) )
if( !parser_test( L"if; end", 0, 0, 0 ) )
{
err( L"Incomplete if statement undetected" );
}
if( !parser_test( L"if test; echo", 0, 0 ) )
if( !parser_test( L"if test; echo", 0, 0, 0 ) )
{
err( L"Missing end undetected" );
}
if( !parser_test( L"if test; end; end", 0, 0 ) )
if( !parser_test( L"if test; end; end", 0, 0, 0 ) )
{
err( L"Unbalanced end undetected" );
}
say( L"Testing detection of invalid use of builtin commands" );
if( !parser_test( L"case foo", 0, 0 ) )
if( !parser_test( L"case foo", 0, 0, 0 ) )
{
err( L"'case' command outside of block context undetected" );
}
if( !parser_test( L"switch ggg; if true; case foo;end;end", 0, 0 ) )
if( !parser_test( L"switch ggg; if true; case foo;end;end", 0, 0, 0 ) )
{
err( L"'case' command outside of switch block context undetected" );
}
if( !parser_test( L"else", 0, 0 ) )
if( !parser_test( L"else", 0, 0, 0 ) )
{
err( L"'else' command outside of conditional block context undetected" );
}
if( !parser_test( L"break", 0, 0 ) )
if( !parser_test( L"break", 0, 0, 0 ) )
{
err( L"'break' command outside of loop block context undetected" );
}
if( !parser_test( L"exec ls|less", 0, 0 ) || !parser_test( L"echo|return", 0, 0 ))
if( !parser_test( L"exec ls|less", 0, 0, 0 ) || !parser_test( L"echo|return", 0, 0, 0 ))
{
err( L"Invalid pipe command undetected" );
}