blob: c37c5bbcea8ffda204e76b36c8662c52d2a045eb [file] [log] [blame]
// RUN: test.sh -p -t %t %s
#include <assert.h>
#include <unistd.h>
#include <string.h>
//
// Use getcwd() to get a path successfully.
//
int main() {
char buf[2], *cwd;
chdir("/");
cwd = getcwd(buf, sizeof(buf));
assert(cwd != NULL);
assert(strcmp(buf, "/") == 0);
return 0;
}