00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include <dSearchPath.h>
00020
00021 #include <string>
00022
00023 void TestSearch()
00024 {
00025 std::string line, path;
00026
00027
00028 path = ". /etc";
00029
00030 line = "searchpath.h";
00031 cout << "looking for file '" << line << "' in path '" << path << "': '";
00032 line = DSearchPath::search_path(line, path);
00033 cout << line << "'" << endl;
00034
00035 line = ".cshrc";
00036 cout << "looking for file '" << line << "' in path '" << path << "': '";
00037 line = DSearchPath::search_path(line, path);
00038 cout << line << "'" << endl;
00039
00040 line = "passwd";
00041 cout << "looking for file '" << line << "' in path '" << path << "': '";
00042 line = DSearchPath::search_path(line, path);
00043 cout << line << "'" << endl;
00044 }
00045
00046 main()
00047 {
00048 cout << "Testing search path:" << endl;
00049 TestSearch();
00050 }