clang-format

This commit is contained in:
2024-09-10 13:03:02 -04:00
parent 53c617d779
commit d66450e427
381 changed files with 28864 additions and 34170 deletions

View File

@@ -43,64 +43,50 @@
#include "config.h"
#include "test.h"
static
void
remove_dir(void)
{
int rv;
static void remove_dir(void) {
int rv;
report_begin("remove() on a directory");
report_begin("remove() on a directory");
if (create_testdir() < 0) {
/*report_aborted();*/ /* XXX in create_testdir */
return;
}
if (create_testdir() < 0) {
/*report_aborted();*/ /* XXX in create_testdir */
return;
}
rv = remove(TESTDIR);
report_check(rv, errno, EISDIR);
rmdir(TESTDIR);
rv = remove(TESTDIR);
report_check(rv, errno, EISDIR);
rmdir(TESTDIR);
}
static
void
remove_dot(void)
{
int rv;
static void remove_dot(void) {
int rv;
report_begin("remove() on .");
rv = remove(".");
report_check2(rv, errno, EISDIR, EINVAL);
report_begin("remove() on .");
rv = remove(".");
report_check2(rv, errno, EISDIR, EINVAL);
}
static
void
remove_dotdot(void)
{
int rv;
static void remove_dotdot(void) {
int rv;
report_begin("remove() on ..");
rv = remove("..");
report_check2(rv, errno, EISDIR, EINVAL);
report_begin("remove() on ..");
rv = remove("..");
report_check2(rv, errno, EISDIR, EINVAL);
}
static
void
remove_empty(void)
{
int rv;
static void remove_empty(void) {
int rv;
report_begin("remove() on empty string");
rv = remove("");
report_check2(rv, errno, EISDIR, EINVAL);
report_begin("remove() on empty string");
rv = remove("");
report_check2(rv, errno, EISDIR, EINVAL);
}
void
test_remove(void)
{
test_remove_path();
void test_remove(void) {
test_remove_path();
remove_dir();
remove_dot();
remove_dotdot();
remove_empty();
remove_dir();
remove_dot();
remove_dotdot();
remove_empty();
}