Mercurial > octave
diff libinterp/corefcn/file-io.cc @ 21580:ecce63c99c3f
maint: Add semicolons to terminate code in %! blocks.
* splineimages.m, Cell.cc, bsxfun.cc, cellfun.cc, conv2.cc, data.cc,
debug.cc, file-io.cc, gcd.cc, getrusage.cc, graphics.cc, kron.cc, mappers.cc,
oct-map.cc, ordschur.cc, psi.cc, rand.cc, variables.cc, __osmesa_print__.cc,
amd.cc, audiodevinfo.cc, dmperm.cc, qr.cc, ov-bool-mat.cc, ov-class.cc,
ov-fcn-handle.cc, ov-java.cc, oct-parse.in.yy, bicubic.m, delaunay3.m,
accumarray.m, flip.m, fliplr.m, flipud.m, gradient.m, inputParser.m, interp1.m,
narginchk.m, rot90.m, validateattributes.m, delaunay.m, delaunayn.m,
griddata3.m, inpolygon.m, waitbar.m, gray2ind.m, hsv2rgb.m, im2double.m,
image.m, imformats.m, imread.m, imshow.m, imwrite.m, ntsc2rgb.m, rgb2hsv.m,
rgb2ntsc.m, isbanded.m, onenormest.m, edit.m, fullfile.m, license.m, ode23.m,
ode45.m, glpk.m, annotation.m, legend.m, orient.m, text.m, area.m, barh.m,
contour.m, line.m, plot.m, plot3.m, plotyy.m, quiver.m, stem.m, clf.m,
copyobj.m, findobj.m, subplot.m, ppval.m, splinefit.m, ismember.m, freqz.m,
unwrap.m, eigs.m, ichol.m, pcg.m, spdiags.m, svds.m, magic.m, lscov.m,
median.m, ols.m, dec2base.m, strsplit.m, strtok.m, test.m, bug-31371.tst,
bug-36025.tst, bug-44940.tst, build-sparse-tests.sh, class-concat.tst,
classdef.tst, classes.tst, colormaps.tst, command.tst, ctor-vs-method.tst,
error.tst, fcn-handle-derived-resolution.tst, for.tst, index.tst, io.tst,
jit.tst, null-assign.tst, parser.tst, struct.tst, system.tst:
Add semicolons to terminate code in %! blocks.
author | Rik <rik@octave.org> |
---|---|
date | Fri, 01 Apr 2016 16:03:29 -0700 |
parents | 02826fb0f261 |
children | 6fab85c1538f |
line wrap: on
line diff
--- a/libinterp/corefcn/file-io.cc Fri Apr 01 14:56:52 2016 -0700 +++ b/libinterp/corefcn/file-io.cc Fri Apr 01 16:03:29 2016 -0700 @@ -1670,7 +1670,7 @@ %! c = textscan (fid, "%f %f", 4); %! fclose (fid); %! unlink (f); -%! assert (c, {[1;3], [2;4]}) +%! assert (c, {[1;3], [2;4]}); %!test %! ## Check number of lines read, with multiple delimiters @@ -1681,7 +1681,7 @@ %! c = textscan (fid, "%f %f", 4, "delimiter", "-", "multipleDelimsAsOne", 1); %! fclose (fid); %! unlink (f); -%! assert (c, {[1;3], [2;4]}) +%! assert (c, {[1;3], [2;4]}); %!test %! ## Check ReturnOnError @@ -1698,10 +1698,10 @@ %! unlink (f); %! u = textscan (str, "%f %f %f"); %! v = textscan (str, "%f %f %f", "ReturnOnError", 1); -%! assert (c, {[1;4], [2;NaN], [3;6]}) -%! assert (d, {[1;4], [2], [3]}) -%! assert (u, {[1;4], [2;NaN], [3;6]}) -%! assert (v, {[1;4], [2], [3]}) +%! assert (c, {[1;4], [2;NaN], [3;6]}); +%! assert (d, {[1;4], [2], [3]}); +%! assert (u, {[1;4], [2;NaN], [3;6]}); +%! assert (v, {[1;4], [2], [3]}); %!test %! ## Check ReturnOnError @@ -1715,8 +1715,8 @@ %! fclose (fid); %! unlink (f); %! u = textscan (str, "%f %f %f", "ReturnOnError", 1); -%! assert (c, {[1;4], 2, 3}) -%! assert (u, {[1;4], 2, 3}) +%! assert (c, {[1;4], 2, 3}); +%! assert (u, {[1;4], 2, 3}); %!error <Read error in field 2 of row 2> textscan ("1 2 3\n4 s 6", "%f %f %f", "ReturnOnError", 0); @@ -1732,23 +1732,23 @@ %! fseek (fid, 0, "bof"); %! fclose (fid); %! unlink (f); -%! assert (c, {[1;4], [NaN;5], [3;6]}) -%! assert (d, {1}) +%! assert (c, {[1;4], [NaN;5], [3;6]}); +%! assert (d, {1}); %!test %! ## Check ReturnOnError with empty fields %! c = textscan ("1,,3\n4,5,6", "", "Delimiter", ",", "ReturnOnError", 1); -%! assert (c, {[1;4], [NaN;5], [3;6]}) +%! assert (c, {[1;4], [NaN;5], [3;6]}); %!test %! ## Check ReturnOnError with empty fields %! c = textscan ("1,,3\n4,5,6", "%f %f %f", "Delimiter", ",", "ReturnOnError", 1); -%! assert (c, {[1;4], [NaN;5], [3;6]}) +%! assert (c, {[1;4], [NaN;5], [3;6]}); %!test %! ## Check ReturnOnError in first column %! c = textscan ("1 2 3\ns 5 6", "", "ReturnOnError", 1); -%! assert (c, {1, 2, 3}) +%! assert (c, {1, 2, 3}); ## Test input validation %!error textscan () @@ -2118,7 +2118,7 @@ %% Check a non-empty line with no valid conversion registers empytValue %!test %! C = textscan ("Empty\n", "Empty%f %f"); -%! assert (C, { NaN, NaN }) +%! assert (C, { NaN, NaN }); %% Check overflow and underflow of integer types %!test