1 /* Tries to remove the current directory.
2 This is allowed to succeed or fail.
3 If it succeeds, then it must not be possible to chdir back to
4 the current directory by name (because it's been deleted).
5 If it fails, then it must be possible to chdir back to the
6 current directory by name (because it still exists). */
10 #include "tests/main.h"
15 CHECK (mkdir ("a"), "mkdir \"a\"");
16 CHECK (chdir ("a"), "chdir \"a\"");
17 msg ("remove \"/a\" (must not crash)");
20 "chdir \"/a\" (remove succeeded so this must return false)");
22 CHECK (chdir ("/a"), "chdir \"/a\" (remove failed so this must succeed)");