wibble 1.1
process.test.h
Go to the documentation of this file.
1/* -*- C++ -*- (c) 2007 Petr Rockai <me@mornfall.net>
2 (c) 2007 Enrico Zini <enrico@enricozini.org> */
3
5
6#include <wibble/test.h>
7
8using namespace std;
9using namespace wibble::sys;
10
13#ifdef POSIX
14 string cwd = process::getcwd();
15 process::chdir("/");
16 assert_eq(process::getcwd(), string("/"));
17 process::chdir(cwd);
19#endif
20 }
21
23#ifdef POSIX
24 mode_t old = process::umask(0012);
25 assert_eq(process::umask(old), 0012u);
26#endif
27 }
28
29};
30
31// vim:set ts=4 sw=4:
std::string getcwd()
Get the absolute path of the current working directory.
Definition buffer.cpp:28
Definition process.test.h:11
Test getcwdAndChdir()
Definition process.test.h:12
Test umask()
Definition process.test.h:22
Definition amorph.h:30
#define assert_eq(x, y)
Definition test.h:33