9{
10 char b1[256];
11
12
13
14 sprintf (b1,
"APATH=../test:../test/A:../test/B");
15
16 ::putenv (b1);
17
18 const char* env_ptr = ::getenv ("APATH");
19 if (env_ptr != 0)
20 {
21 std::string env = env_ptr;
22
23 std::cout << "APATH=" << env << std::endl;
24 }
25
26 std::string name;
27
29 std::cout << "1) [a.txt] Name = " << name << " [expected : ../test/A/a.txt]" << std::endl;
30
32 std::cout << "2) [x] Name = " << name << " [expected : ]" << std::endl;
33
35 std::cout << "3) [x] Name = " << name << " [expected : ../test/A/x]" << std::endl;
36
38 std::cout << "4) [b.txt] Name = " << name << " [expected : ../test/A/b.txt]" << std::endl;
39
41 std::cout << "5) [c.txt] Name = " << name << " [expected : ../src/dd.txt]" << std::endl;
42
44 std::cout << "6) [A/a.txt] Name = " << name << " [expected : ../test/A/a.txt]" << std::endl;
45
47 std::cout << "7) [A/d.txt] Name = " << name << " [expected : ]" << std::endl;
48
50 std::cout << "8) [A/e.txt] Name = " << name << " [expected : ]" << std::endl;
51
53 std::cout << "9) [e.txt] Name = " << name << " [expected : ./s/t/u/e.txt]" << std::endl;
54
55}
sprintf(cut,"kal_costheta0_em>-0.93&&kal_costheta0_em<0.93&&kal_pxy0_em>=0.05+%d*0.1&&kal_pxy0_em<0.15+%d*0.1&&NGch>=2", j, j)
std::string PathResolverFindDirectory(const std::string &logical_file_name, const std::string &search_path)
std::string PathResolverFindFile(const std::string &logical_file_name, const std::string &search_path)
static std::string find_file(const std::string &logical_file_name, const std::string &search_path, SearchType search_type=LocalSearch)