panda3d/dtool/src/dconfig/test_searchpath.cxx
Sam Edwards b2bfb31114 general: Remove using std::* from headers
Also remove most `using namespace std;` statements. The only one that remains is in py_panda.h.

Closes #350
Closes #335
2018-06-14 16:04:49 +02:00

49 lines
1.2 KiB
C++

/**
* PANDA 3D SOFTWARE
* Copyright (c) Carnegie Mellon University. All rights reserved.
*
* All use of this software is subject to the terms of the revised BSD
* license. You should have received a copy of this license along
* with this source code in a file named "LICENSE."
*
* @file test_searchpath.cxx
* @author cary
* @date 1998-09-01
*/
#include "dSearchPath.h"
// #include "expand.h"
#include <string>
using std::cout;
using std::endl;
void TestSearch()
{
std::string line, path;
// path = ".:~ etc";
path = ". /etc";
// path = Expand::Expand(path);
line = "searchpath.h";
cout << "looking for file '" << line << "' in path '" << path << "': '";
line = DSearchPath::search_path(line, path);
cout << line << "'" << endl;
line = ".cshrc";
cout << "looking for file '" << line << "' in path '" << path << "': '";
line = DSearchPath::search_path(line, path);
cout << line << "'" << endl;
line = "passwd";
cout << "looking for file '" << line << "' in path '" << path << "': '";
line = DSearchPath::search_path(line, path);
cout << line << "'" << endl;
}
main()
{
cout << "Testing search path:" << endl;
TestSearch();
}