mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
tests: close files in glr-regression
* tests/glr-regression.at: Here.
This commit is contained in:
committed by
Akim Demaille
parent
be3517b007
commit
05c93b7d84
@@ -196,8 +196,12 @@ int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
input = stdin;
|
||||
if (argc == 2 && !(input = fopen (argv[1], "r"))) return 3;
|
||||
return yyparse ();
|
||||
if (argc == 2 && !(input = fopen (argv[1], "r")))
|
||||
return 3;
|
||||
int res = yyparse ();
|
||||
if (argc == 2 && fclose (input))
|
||||
return 4;
|
||||
return res;
|
||||
}
|
||||
]])
|
||||
AT_BISON_OPTION_POPDEFS
|
||||
@@ -324,8 +328,12 @@ int
|
||||
main(int argc, char* argv[])
|
||||
{
|
||||
input = stdin;
|
||||
if (argc == 2 && !(input = fopen (argv[1], "r"))) return 3;
|
||||
return yyparse ();
|
||||
if (argc == 2 && !(input = fopen (argv[1], "r")))
|
||||
return 3;
|
||||
int res = yyparse ();
|
||||
if (argc == 2 && fclose (input))
|
||||
return 4;
|
||||
return res;
|
||||
}
|
||||
]])
|
||||
AT_BISON_OPTION_POPDEFS
|
||||
|
||||
Reference in New Issue
Block a user