octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

pwd > "error: unable to find current directory"


From: Ben Abbott
Subject: pwd > "error: unable to find current directory"
Date: Fri, 19 Feb 2010 22:51:02 -0800

On MacOS X with tip below

changeset:   10335:9dd04a06410e
tag:         tip
user:        Thorsten Meyer <address@hidden>
date:        Thu Feb 18 22:45:40 2010 +0100
summary:     document glob patterns

Is anyone else seeing the problem below ...

octave:6> fntests

Integrated test scripts:
 src/DLD-FUNCTIONS/besselj.cc ........................... PASS  180/180 
 src/DLD-FUNCTIONS/betainc.cc ........................... PASS    6/6   
.
.
.
 src/data.cc ............................................ PASS  544/545  FAIL 1
 src/dirfns.cc .......................................... PASS    0/1    FAIL 1
 src/graphics.cc ........................................unable to find current 
directory
octave:7> pwd
error: unable to find current directory
error: unable to find current directory

However, if I try pwd before fntests …

octave:1> pwd
ans = /Users/bpabbott/Development/mercurial/local_clone/src

It appears that pwd() fails only after "test dirfns.cc"

octave:1> test dirfns.cc
 ***** test
 tmpdir = tmpnam;
 filename = {"file1", "file2", "file3", "myfile1", "myfile1b"};
 if (mkdir (tmpdir))
   cwd = pwd;
   cd (tmpdir);
   if strcmp (pwd, tmpdir)
     a = 0;
     for n = 1:5
       save (filename{n}, "a");
     endfor
   else
     rmdir (tmpdir);
     error ("Couldn't change to temporary dir");
   endif
 else
   error ("Couldn't create temporary directory");
 endif
 result1 = glob ("*file1");
 result2 = glob ("myfile?");
 result3 = glob ("file[12]");
 for n = 1:5
   delete (filename{n});
 endfor
 cd (cwd);
 rmdir (tmpdir);
 assert (result1, {"file1"; "myfile1"});
 assert (result2, {"myfile1"});
 assert (result3, {"file1"; "file2"});
!!!!! test failed
Couldn't change to temporary dir
octave:2> 

Ben


reply via email to

[Prev in Thread] Current Thread [Next in Thread]