tests: check fclose's return value.

* tests/calc.at (_AT_DATA_CALC_Y): Check fclose's return status.
(cherry picked from commit af129079f0)
This commit is contained in:
Akim Demaille
2010-04-10 13:38:37 +02:00
parent 16d9244df6
commit 2f61c4a2d0
2 changed files with 7 additions and 1 deletions

View File

@@ -1,3 +1,8 @@
2010-04-13 Akim Demaille <demaille@gostai.com>
tests: check fclose's return value.
* tests/calc.at (_AT_DATA_CALC_Y): Check fclose's return status.
2010-04-13 Akim Demaille <demaille@gostai.com>
tests: don't depend on the actual location type.

View File

@@ -347,7 +347,8 @@ main (int argc, const char **argv)
]AT_SKEL_CC_IF([], [m4_bmatch([$4], [%debug],
[ yydebug = 1;])])[
status = yyparse (]AT_PARAM_IF([[&result, &count]])[);
fclose (input);
if (fclose (input))
perror ("fclose");
if (global_result != result)
abort ();
if (global_count != count)