comparison scripts/miscellaneous/fileattrib.m @ 20928:2b8447888e0a

strip trailing whitespace from files * md5sum.m, fileattrib.m, ode23.m, odeplot.m, ode_struct_value_check.m, runge_kutta_23.m runge_kutta_interpolate.m: Strip trailing whitespace.
author John W. Eaton <jwe@octave.org>
date Thu, 17 Dec 2015 11:50:59 -0500
parents 516bb87ea72e
children 3b2cc6ef0624
comparison
equal deleted inserted replaced
20927:1da6c81e6486 20928:2b8447888e0a
95 if (isunix ()) 95 if (isunix ())
96 r(i).archive = NaN; 96 r(i).archive = NaN;
97 r(i).system = NaN; 97 r(i).system = NaN;
98 r(i).hidden = NaN; 98 r(i).hidden = NaN;
99 else 99 else
100 [~, attrib] = dos (sprintf ('attrib "%s"', r(i).Name)); 100 [~, attrib] = dos (sprintf ('attrib "%s"', r(i).Name));
101 ## dos() never returns error status so have to check it indirectly 101 ## dos() never returns error status so have to check it indirectly
102 if (length (attrib) < 12 102 if (length (attrib) < 12
103 || ! strcmp (deblank (attrib(12:end)), r(i).Name)) 103 || ! strcmp (deblank (attrib(12:end)), r(i).Name))
104 status = false; 104 status = false;
105 msgid = "fileattrib"; 105 msgid = "fileattrib";
149 149
150 endfunction 150 endfunction
151 151
152 152
153 %!test 153 %!test
154 %! [status, attr] = fileattrib (P_tmpdir ()); 154 %! [status, attr] = fileattrib (P_tmpdir ());
155 %! assert (status); 155 %! assert (status);
156 %! assert (isstruct (attr)); 156 %! assert (isstruct (attr));
157 %! assert (numel (fieldnames (attr)), 14); 157 %! assert (numel (fieldnames (attr)), 14);
158 %! assert (attr.Name, P_tmpdir ()); 158 %! assert (attr.Name, P_tmpdir ());
159 %! assert (attr.directory); 159 %! assert (attr.directory);