Mercurial > octave
diff src/dirfns.cc @ 14429:eff4a5933e28
Update %!tests in src/ directory with Octave coding conventions.
* data.cc, defaults.cc, dirfns.cc, file-io.cc, graphics.cc, mappers.cc,
oct-map.cc, octave.cc, ov-base.cc, ov-bool-mat.cc, ov-cell.cc,
ov-fcn-handle.cc, ov-fcn-inline.cc, ov-flt-re-mat.cc, ov-int16.cc, ov-int32.cc,
ov-int64.cc, ov-int8.cc, ov-null-mat.cc, ov-oncleanup.cc, ov-range.cc,
ov-re-mat.cc, ov-struct.cc, ov-typeinfo.cc, ov-uint16.cc, ov-uint32.cc,
ov-uint64.cc, ov-uint8.cc, ov.cc, pr-output.cc, pt-binop.cc, pt-eval.cc,
pt-idx.cc, pt-mat.cc, sighandlers.cc, strfns.cc, symtab.cc, syscalls.cc,
sysdep.cc, toplev.cc, utils.cc, variables.cc: Update %!tests in src/ directory
with Octave coding conventions.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Sun, 04 Mar 2012 12:21:10 -0800 |
parents | b76f0740940e |
children | a543ed02e673 |
line wrap: on
line diff
--- a/src/dirfns.cc Fri Mar 02 22:14:27 2012 -0800 +++ b/src/dirfns.cc Sun Mar 04 12:21:10 2012 -0800 @@ -617,35 +617,34 @@ /* %!test -%! tmpdir = tmpnam; -%! filename = {"file1", "file2", "file3", "myfile1", "myfile1b"}; -%! if (mkdir (tmpdir)) -%! cwd = pwd; -%! cd (tmpdir); -%! if strcmp (canonicalize_file_name (pwd), ... -%! canonicalize_file_name (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"}); +%! tmpdir = tmpnam; +%! filename = {"file1", "file2", "file3", "myfile1", "myfile1b"}; +%! if (mkdir (tmpdir)) +%! cwd = pwd; +%! cd (tmpdir); +%! if strcmp (canonicalize_file_name (pwd), canonicalize_file_name (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"}); */ DEFUNX ("fnmatch", Ffnmatch, args, ,