Functions
test_persist_files.cxx File Reference
#include "WireCellUtil/Persist.h"
#include "WireCellUtil/Testing.h"
#include <cstdlib>
#include <string>
#include <iostream>

Go to the source code of this file.

Functions

int main ()
 

Function Documentation

int main ( void  )

Definition at line 12 of file test_persist_files.cxx.

13 {
14  Assert(Persist::exists("/etc"));
15  Assert(Persist::exists("/etc/hosts"));
16 
17  setenv("WIRECELL_PATH", "/etc:/usr:/var", 1);
18  std::string etchosts = Persist::resolve("hosts");
19  //std::cerr << etchosts << std::endl;
20  Assert(etchosts == "/etc/hosts");
21 
22  std::string dne = Persist::resolve("this_file-really_should-not_exist");
23  Assert(dne.empty());
24 
25  return 0;
26 }
std::string string
Definition: nybbler.cc:12
#define Assert
Definition: Testing.h:7
bool exists(std::string path)
std::string resolve(const std::string &filename)
Definition: Persist.cxx:99