]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/test-file-path.cc
Issue 5167/6: Changes: show \markup xxx = ... \etc assignments
[lilypond.git] / flower / test-file-path.cc
index 053d237b66eec07064aa412a6b69dba81b89759c..8a891afeea8c79d1d6da211fccc148803fcf8424 100644 (file)
@@ -1,4 +1,8 @@
 #include "file-path.hh"
+#include "file-name.hh"
+
+#include <limits.h>
+#include <unistd.h>
 
 #include "yaffut.hh"
 #include "config.hh"
@@ -7,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);