Blame gettext-tools/gnulib-tests/test-rmdir.c

Packit Bot 06c835
/* Tests of rmdir.
Packit Bot 06c835
   Copyright (C) 2009-2015 Free Software Foundation, Inc.
Packit Bot 06c835
Packit Bot 06c835
   This program is free software: you can redistribute it and/or modify
Packit Bot 06c835
   it under the terms of the GNU General Public License as published by
Packit Bot 06c835
   the Free Software Foundation; either version 3 of the License, or
Packit Bot 06c835
   (at your option) any later version.
Packit Bot 06c835
Packit Bot 06c835
   This program is distributed in the hope that it will be useful,
Packit Bot 06c835
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Bot 06c835
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit Bot 06c835
   GNU General Public License for more details.
Packit Bot 06c835
Packit Bot 06c835
   You should have received a copy of the GNU General Public License
Packit Bot 06c835
   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
Packit Bot 06c835
Packit Bot 06c835
/* Written by Eric Blake <ebb9@byu.net>, 2009.  */
Packit Bot 06c835
Packit Bot 06c835
#include <config.h>
Packit Bot 06c835
Packit Bot 06c835
#include <unistd.h>
Packit Bot 06c835
Packit Bot 06c835
#include "signature.h"
Packit Bot 06c835
SIGNATURE_CHECK (rmdir, int, (char const *));
Packit Bot 06c835
Packit Bot 06c835
#include <fcntl.h>
Packit Bot 06c835
#include <errno.h>
Packit Bot 06c835
#include <stdbool.h>
Packit Bot 06c835
#include <stdio.h>
Packit Bot 06c835
#include <stdlib.h>
Packit Bot 06c835
#include <sys/stat.h>
Packit Bot 06c835
Packit Bot 06c835
#include "ignore-value.h"
Packit Bot 06c835
#include "macros.h"
Packit Bot 06c835
Packit Bot 06c835
#define BASE "test-rmdir.t"
Packit Bot 06c835
Packit Bot 06c835
#include "test-rmdir.h"
Packit Bot 06c835
Packit Bot 06c835
int
Packit Bot 06c835
main (void)
Packit Bot 06c835
{
Packit Bot 06c835
  /* Remove any leftovers from a previous partial run.  */
Packit Bot 06c835
  ignore_value (system ("rm -rf " BASE "*"));
Packit Bot 06c835
Packit Bot 06c835
  return test_rmdir_func (rmdir, true);
Packit Bot 06c835
}