wibble
1.1
Main Page
Namespaces
Classes
Files
File List
File Members
wibble
sys
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
{
12
Test
getcwdAndChdir
() {
13
#ifdef POSIX
14
string
cwd =
process::getcwd
();
15
process::chdir(
"/"
);
16
assert_eq
(
process::getcwd
(),
string
(
"/"
));
17
process::chdir(cwd);
18
assert_eq
(
process::getcwd
(), cwd);
19
#endif
20
}
21
22
Test
umask
() {
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:
Generated on Wed Oct 23 2013 17:14:25 for wibble by
1.8.4