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