X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=flower%2Ftest-file-path.cc;h=99366a1f100d0182bb248ffd1eae22ff595c7303;hb=460165d9b83877a13f47060486f77aa8de0bd649;hp=053d237b66eec07064aa412a6b69dba81b89759c;hpb=f9214bac21e9926dc3248416f58190c98c4167a9;p=lilypond.git diff --git a/flower/test-file-path.cc b/flower/test-file-path.cc index 053d237b66..99366a1f10 100644 --- a/flower/test-file-path.cc +++ b/flower/test-file-path.cc @@ -1,5 +1,7 @@ #include "file-path.hh" +#include + #include "yaffut.hh" #include "config.hh" @@ -8,7 +10,11 @@ TEST (File_path, Find) char const *extensions[] = {"ly", "", 0}; string file = "init"; char cwd[PATH_MAX]; - getcwd (cwd, PATH_MAX); + if (!getcwd (cwd, PATH_MAX)) + { + 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);