rmdir.c 334 B

123456789101112131415
  1. #include <unistd.h>
  2. #include <sys/stat.h>
  3. #include <stdio.h>
  4. #include "test_helpers.h"
  5. int main(void) {
  6. int mk_status = mkdir("foo", 0);
  7. ERROR_IF(mkdir, mk_status, == -1);
  8. UNEXP_IF(mkdir, mk_status, != 0);
  9. int rm_status = rmdir("foo");
  10. ERROR_IF(rmdir, rm_status, == -1);
  11. UNEXP_IF(rmdir, rm_status, != 0);
  12. }