1 #include "file-path.hh"
11 TEST (File_path, Find)
13 char const *extensions[] = {"ly", "", 0};
16 if (!getcwd (cwd, PATH_MAX))
18 cerr << "Could not get current work directory\n";
21 string ly_dir = string (getenv ("top-src-dir")) + "/ly";
22 parse_path (string (1, PATHSEP) + ly_dir);
23 string file_name = find (file, extensions);
24 EQUAL (file_name.substr (file_name.rfind ('/')), "/init.ly");
26 file_name = find (file, extensions);
27 EQUAL (file_name, ly_dir + "/init.ly");