rvm  1.11
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Macros | Functions
test-fs.cc File Reference
#include "config.h"
#include <iostream>
#include <fstream>
#include <cstdio>
#include <cassert>
#include "asserts.h"
#include "error.h"
#include "fs.h"
#include "test-fs-cwd.h"
Include dependency graph for test-fs.cc:

Go to the source code of this file.

Macros

#define TRY_COMMAND(code)
 

Functions

void create_file (const std::string &pathname, uint32 size)
 
void cleanup (void)
 
void test_cwd (void)
 
void test_reform_path (void)
 
void test_permute_path (void)
 
void test_exists (void)
 
void test_readable (void)
 
void test_writable (void)
 
void test_executable (void)
 
void test_mk_dir (void)
 
void test_rm_dir (void)
 
void test_rm_file (void)
 
void test_mk_dirhier (void)
 
void test_filestatus (void)
 
void test_mk_symlink (void)
 
void test_mk_relative_symlink (void)
 
const subdirectory test_subdirectory_sub (void)
 
void test_subdirectory (void)
 
void test_directory (void)
 
void test_rm_recursive (void)
 
void test_mk_relative_path (void)
 
void test_filesystem (void)
 
void test_simple_lock (void)
 
int main (int argc, char const *argv[])
 

Macro Definition Documentation

#define TRY_COMMAND (   code)
Value:
thrown = false; \
try { \
code; \
} \
catch(...) { \
thrown = true; \
}

Definition at line 14 of file test-fs.cc.

Referenced by test_directory(), test_filestatus(), test_mk_dir(), test_mk_dirhier(), test_mk_relative_symlink(), test_mk_symlink(), test_rm_dir(), test_rm_file(), test_rm_recursive(), and test_subdirectory().

Function Documentation

void cleanup ( void  )

Definition at line 63 of file test-fs.cc.

Referenced by main().

void create_file ( const std::string &  pathname,
uint32  size 
)

Definition at line 23 of file test-fs.cc.

References ERROR.

Referenced by test_filestatus(), and test_rm_file().

int main ( int  argc,
char const *  argv[] 
)
void test_cwd ( void  )

Definition at line 71 of file test-fs.cc.

References check_cwd, and cwd().

Here is the call graph for this function:

void test_directory ( void  )

Definition at line 327 of file test-fs.cc.

References directory::path(), and TRY_COMMAND.

Referenced by main().

Here is the call graph for this function:

void test_executable ( void  )

Definition at line 121 of file test-fs.cc.

References executable(), and exists().

Referenced by main().

Here is the call graph for this function:

void test_exists ( void  )

Definition at line 105 of file test-fs.cc.

References exists().

Referenced by main().

Here is the call graph for this function:

void test_filestatus ( void  )

Definition at line 182 of file test-fs.cc.

References create_file(), exists(), filestatus::path(), filestatus::size(), and TRY_COMMAND.

Referenced by main().

Here is the call graph for this function:

void test_filesystem ( void  )

Definition at line 410 of file test-fs.cc.

References cwd(), and filesystem::path().

Referenced by main().

Here is the call graph for this function:

void test_mk_dir ( void  )

Definition at line 127 of file test-fs.cc.

References exists(), mk_dir(), and TRY_COMMAND.

Referenced by main().

Here is the call graph for this function:

void test_mk_dirhier ( void  )

Definition at line 165 of file test-fs.cc.

References exists(), mk_dirhier(), and TRY_COMMAND.

Referenced by main().

Here is the call graph for this function:

void test_mk_relative_path ( void  )

Definition at line 371 of file test-fs.cc.

References mk_relative_path().

Referenced by main().

Here is the call graph for this function:

void test_mk_relative_symlink ( void  )

Definition at line 236 of file test-fs.cc.

References exists(), filestatus::link(), mk_relative_symlink(), filestatus::path(), and TRY_COMMAND.

Referenced by main().

Here is the call graph for this function:

void test_mk_symlink ( void  )

Definition at line 219 of file test-fs.cc.

References exists(), filestatus::link(), mk_symlink(), filestatus::path(), and TRY_COMMAND.

Referenced by main().

Here is the call graph for this function:

void test_permute_path ( void  )

Definition at line 93 of file test-fs.cc.

References permute_path().

Referenced by main().

Here is the call graph for this function:

void test_readable ( void  )

Definition at line 111 of file test-fs.cc.

References readable().

Referenced by main().

Here is the call graph for this function:

void test_reform_path ( void  )

Definition at line 81 of file test-fs.cc.

References reform_path().

Referenced by main().

Here is the call graph for this function:

void test_rm_dir ( void  )

Definition at line 137 of file test-fs.cc.

References exists(), rm_dir(), and TRY_COMMAND.

Referenced by main().

Here is the call graph for this function:

void test_rm_file ( void  )

Definition at line 147 of file test-fs.cc.

References create_file(), exists(), mk_dir(), rm_dir(), rm_file(), and TRY_COMMAND.

Referenced by main().

Here is the call graph for this function:

void test_rm_recursive ( void  )

Definition at line 362 of file test-fs.cc.

References exists(), rm_recursive(), and TRY_COMMAND.

Referenced by main().

Here is the call graph for this function:

void test_simple_lock ( void  )

Definition at line 417 of file test-fs.cc.

References exists(), simple_lock::is_locked(), simple_lock::lock(), simple_lock::locked_by(), simple_lock::lockfile(), mk_dir(), pid(), and simple_lock::unlock().

Referenced by main().

Here is the call graph for this function:

void test_subdirectory ( void  )

Definition at line 285 of file test-fs.cc.

References subdirectory::path(), test_subdirectory_sub(), and TRY_COMMAND.

Referenced by main().

Here is the call graph for this function:

const subdirectory test_subdirectory_sub ( void  )

Definition at line 277 of file test-fs.cc.

References subdirectory::path().

Referenced by test_subdirectory().

Here is the call graph for this function:

void test_writable ( void  )

Definition at line 116 of file test-fs.cc.

References writable().

Referenced by main().

Here is the call graph for this function: