Mercurial > hg > octave-nkf
comparison test/test_system.m @ 14742:7e198fe3732c
Backout changeset c2411bff11c6: mkdir-p tests
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 07 Jun 2012 07:28:44 -0400 |
parents | c2411bff11c6 |
children | 5b2126a8c84f |
comparison
equal
deleted
inserted
replaced
14741:0ab3dd0fad18 | 14742:7e198fe3732c |
---|---|
122 %% test/octave.test/system/readdir-3.m | 122 %% test/octave.test/system/readdir-3.m |
123 %!error <Invalid call to readdir> readdir ("foo", 1) | 123 %!error <Invalid call to readdir> readdir ("foo", 1) |
124 | 124 |
125 %% test/octave.test/system/mk-rm-dir-1.m | 125 %% test/octave.test/system/mk-rm-dir-1.m |
126 %!test | 126 %!test |
127 %! ## FIXME: saving and restoring of pwd in olldir is a hack | |
128 %! ## 'mkdir' should not change pwd but it does since | |
129 %! ## changeset 14679:a543ed02e673 | |
130 %! ## which created 'mkdir -p' capabilities. | |
131 %! ## When 'mkdir' has been corrected, delete this FIXME | |
132 %! ## and any lines with 'HACK'. | |
133 %! olddir = pwd; # HACK Line #1 | |
134 %! nm = tmpnam (); | 127 %! nm = tmpnam (); |
135 %! e1 = mkdir (nm); | 128 %! e1 = mkdir (nm); |
136 %! [s2, e2] = stat (nm); | 129 %! [s2, e2] = stat (nm); |
137 %! e3 = rmdir (nm); | 130 %! e3 = rmdir (nm); |
138 %! [s4, e4] = stat (nm); | 131 %! [s4, e4] = stat (nm); |
139 %! cd (olddir); # HACK Line #2 | |
140 %! assert ((e1 && strcmp (s2.modestr(1), "d") && e3 && e4 < 0)); | 132 %! assert ((e1 && strcmp (s2.modestr(1), "d") && e3 && e4 < 0)); |
141 | 133 |
142 %% test/octave.test/system/mkdir-1.m | 134 %% test/octave.test/system/mkdir-1.m |
143 %!error <Invalid call to mkdir> mkdir () | 135 %!error <Invalid call to mkdir> mkdir () |
144 | 136 |