clang-format
This commit is contained in:
@@ -43,62 +43,48 @@
|
||||
#include "config.h"
|
||||
#include "test.h"
|
||||
|
||||
static
|
||||
void
|
||||
rmdir_file(void)
|
||||
{
|
||||
int rv;
|
||||
static void rmdir_file(void) {
|
||||
int rv;
|
||||
|
||||
report_begin("rmdir a file");
|
||||
if (create_testfile()<0) {
|
||||
report_aborted();
|
||||
return;
|
||||
}
|
||||
rv = rmdir(TESTFILE);
|
||||
report_check(rv, errno, ENOTDIR);
|
||||
remove(TESTFILE);
|
||||
report_begin("rmdir a file");
|
||||
if (create_testfile() < 0) {
|
||||
report_aborted();
|
||||
return;
|
||||
}
|
||||
rv = rmdir(TESTFILE);
|
||||
report_check(rv, errno, ENOTDIR);
|
||||
remove(TESTFILE);
|
||||
}
|
||||
|
||||
static
|
||||
void
|
||||
rmdir_dot(void)
|
||||
{
|
||||
int rv;
|
||||
static void rmdir_dot(void) {
|
||||
int rv;
|
||||
|
||||
report_begin("rmdir .");
|
||||
rv = rmdir(".");
|
||||
report_check(rv, errno, EINVAL);
|
||||
report_begin("rmdir .");
|
||||
rv = rmdir(".");
|
||||
report_check(rv, errno, EINVAL);
|
||||
}
|
||||
|
||||
static
|
||||
void
|
||||
rmdir_dotdot(void)
|
||||
{
|
||||
int rv;
|
||||
static void rmdir_dotdot(void) {
|
||||
int rv;
|
||||
|
||||
report_begin("rmdir ..");
|
||||
rv = rmdir("..");
|
||||
report_check2(rv, errno, EINVAL, ENOTEMPTY);
|
||||
report_begin("rmdir ..");
|
||||
rv = rmdir("..");
|
||||
report_check2(rv, errno, EINVAL, ENOTEMPTY);
|
||||
}
|
||||
|
||||
static
|
||||
void
|
||||
rmdir_empty(void)
|
||||
{
|
||||
int rv;
|
||||
static void rmdir_empty(void) {
|
||||
int rv;
|
||||
|
||||
report_begin("rmdir empty string");
|
||||
rv = rmdir("");
|
||||
report_check(rv, errno, EINVAL);
|
||||
report_begin("rmdir empty string");
|
||||
rv = rmdir("");
|
||||
report_check(rv, errno, EINVAL);
|
||||
}
|
||||
|
||||
void
|
||||
test_rmdir(void)
|
||||
{
|
||||
test_rmdir_path();
|
||||
void test_rmdir(void) {
|
||||
test_rmdir_path();
|
||||
|
||||
rmdir_file();
|
||||
rmdir_dot();
|
||||
rmdir_dotdot();
|
||||
rmdir_empty();
|
||||
rmdir_file();
|
||||
rmdir_dot();
|
||||
rmdir_dotdot();
|
||||
rmdir_empty();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user