X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=flower%2Ftest-file-path.cc;h=8a891afeea8c79d1d6da211fccc148803fcf8424;hb=90e4d7057f3857da049dfda3d130017d4719bd6b;hp=fa23bddedd6741984e25203bb5883a804675b664;hpb=cb0b407e567feca71cbc5f9479a06b266c69a26c;p=lilypond.git diff --git a/flower/test-file-path.cc b/flower/test-file-path.cc index fa23bddedd..8a891afeea 100644 --- a/flower/test-file-path.cc +++ b/flower/test-file-path.cc @@ -1,4 +1,5 @@ #include "file-path.hh" +#include "file-name.hh" #include #include @@ -6,16 +7,13 @@ #include "yaffut.hh" #include "config.hh" -using std::string; - TEST (File_path, Find) { char const *extensions[] = {"ly", "", 0}; string file = "init"; - char cwd[PATH_MAX]; - if (!getcwd (cwd, PATH_MAX)) + if (get_working_directory().empty()) { - std::cerr << "Could not get current work directory\n"; + cerr << "Could not get current work directory\n"; exit (1); } string ly_dir = string (getenv ("top-src-dir")) + "/ly";