Modify get_directory_description to return a flat cell

time-shift
Sébastien Villemot 2013-12-09 18:54:12 +01:00
parent 2d966208c4
commit b840af9fa5
2 changed files with 12 additions and 16 deletions

View File

@ -24,10 +24,11 @@ file = 1;
for f=1:length(dd)
if ~(isequal(dd(f).name,'.') || isequal(dd(f).name,'..'))
if dd(f).isdir
flist(file) = { get_directory_description([ basedir filesep dd(f).name]) };
r = get_directory_description([ basedir filesep dd(f).name]);
flist = { flist{:} r{:} };
else
flist(file) = { [basedir filesep dd(f).name] };
flist{length(flist)+1} = [basedir filesep dd(f).name];
end
file = file + 1;
end
end
end

View File

@ -20,22 +20,17 @@ function [report, time] = run_unitary_tests(listoffiles)
report = {};
for f=1:length(listoffiles)
if iscell(listoffiles{f})
info = run_unitary_tests(listoffiles{f});
report = [report; info];
else
if isequal(listoffiles{f}(end-1:end),'.m') && isempty(strfind(listoffiles{f},'.#'))
if is_unitary_test_available(listoffiles{f})
disp(['***** Process unitary tests in ' listoffiles{f}])
[check, info] = mtest(listoffiles{f});
report = [report; info];
else
disp(['Booh! No unitary tests available in ' listoffiles{f}])
end
if isequal(listoffiles{f}(end-1:end),'.m') && isempty(strfind(listoffiles{f},'.#'))
if is_unitary_test_available(listoffiles{f})
disp(['***** Process unitary tests in ' listoffiles{f}])
[check, info] = mtest(listoffiles{f});
report = [report; info];
else
disp(['Booh! No unitary tests available in ' listoffiles{f}])
end
end
end
if nargout>1
time = clock;
end
end