diff --git a/lib/tests/t_api.c b/lib/tests/t_api.c index 09cea48114..2cdbeb4891 100644 --- a/lib/tests/t_api.c +++ b/lib/tests/t_api.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: t_api.c,v 1.63 2008/01/18 23:46:58 tbox Exp $ */ +/* $Id: t_api.c,v 1.64 2009/03/02 01:57:10 marka Exp $ */ /*! \file */ @@ -224,8 +224,10 @@ main(int argc, char **argv) { * Set cwd. */ - if (T_dir != NULL) - (void) chdir(T_dir); + if (T_dir != NULL && chdir(T_dir) != 0) { + fprintf(stderr, "chdir %s failed\n", T_dir); + exit(1); + } /* * We don't want buffered output.