From: Akim Demaille Date: Sat, 10 Apr 2010 11:38:37 +0000 (+0200) Subject: tests: check fclose's return value. X-Git-Tag: v2.5_rc1~91 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/2f61c4a2d045455f8b543ce9472099e599139737?hp=16d9244df663152483760bff8e3db7eeba9d4cc1 tests: check fclose's return value. * tests/calc.at (_AT_DATA_CALC_Y): Check fclose's return status. (cherry picked from commit af129079f04cc53129c9056af3ed3e3ae30fd10a) --- diff --git a/ChangeLog b/ChangeLog index 8b30e95d..bf4c2f9a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-04-13 Akim Demaille + + tests: check fclose's return value. + * tests/calc.at (_AT_DATA_CALC_Y): Check fclose's return status. + 2010-04-13 Akim Demaille tests: don't depend on the actual location type. diff --git a/tests/calc.at b/tests/calc.at index aa1d5e3c..9336113a 100644 --- a/tests/calc.at +++ b/tests/calc.at @@ -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)