wibble  0.1.28
process.test.h
Go to the documentation of this file.
00001 /* -*- C++ -*- (c) 2007 Petr Rockai <me@mornfall.net>
00002                (c) 2007 Enrico Zini <enrico@enricozini.org> */
00003 
00004 #include <wibble/sys/process.h>
00005 
00006 #include <wibble/test.h>
00007 
00008 using namespace std;
00009 using namespace wibble::sys;
00010 
00011 struct TestProcess {
00012     Test getcwdAndChdir() {
00013         string cwd = process::getcwd();
00014         process::chdir("/");
00015         assert_eq(process::getcwd(), string("/"));
00016         process::chdir(cwd);
00017         assert_eq(process::getcwd(), cwd);
00018     }
00019 
00020     Test umask() {
00021         mode_t old = process::umask(0012);
00022         assert_eq(process::umask(old), 0012u);
00023     }
00024 
00025 };
00026 
00027 // vim:set ts=4 sw=4: