wibble  0.1.28
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 
4 #include <wibble/sys/process.h>
5 
6 #include <wibble/test.h>
7 
8 using namespace std;
9 using namespace wibble::sys;
10 
11 struct TestProcess {
13  string cwd = process::getcwd();
14  process::chdir("/");
15  assert_eq(process::getcwd(), string("/"));
16  process::chdir(cwd);
17  assert_eq(process::getcwd(), cwd);
18  }
19 
20  Test umask() {
21  mode_t old = process::umask(0012);
22  assert_eq(process::umask(old), 0012u);
23  }
24 
25 };
26 
27 // vim:set ts=4 sw=4: