annotate test/io.tst @ 28221:ebff357efd56

maint: merge stable to default.
author John W. Eaton <jwe@octave.org>
date Tue, 14 Apr 2020 22:55:33 -0400
parents 501553fcf6e2 6cccc3c82175
children 822dc79a7e97
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
1 ########################################################################
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
2 ##
27919
1891570abac8 update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents: 27918
diff changeset
3 ## Copyright (C) 2006-2020 The Octave Project Developers
27918
b442ec6dda5c use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents: 27137
diff changeset
4 ##
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
5 ## See the file COPYRIGHT.md in the top-level directory of this
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
6 ## distribution or <https://octave.org/copyright/>.
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5969
diff changeset
7 ##
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5969
diff changeset
8 ## This file is part of Octave.
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5969
diff changeset
9 ##
24534
194eb4bd202b maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents: 24477
diff changeset
10 ## Octave is free software: you can redistribute it and/or modify it
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5969
diff changeset
11 ## under the terms of the GNU General Public License as published by
24534
194eb4bd202b maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents: 24477
diff changeset
12 ## the Free Software Foundation, either version 3 of the License, or
22755
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22389
diff changeset
13 ## (at your option) any later version.
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5969
diff changeset
14 ##
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5969
diff changeset
15 ## Octave is distributed in the hope that it will be useful, but
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5969
diff changeset
16 ## WITHOUT ANY WARRANTY; without even the implied warranty of
22755
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22389
diff changeset
17 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22389
diff changeset
18 ## GNU General Public License for more details.
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5969
diff changeset
19 ##
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5969
diff changeset
20 ## You should have received a copy of the GNU General Public License
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5969
diff changeset
21 ## along with Octave; see the file COPYING. If not, see
24534
194eb4bd202b maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents: 24477
diff changeset
22 ## <https://www.gnu.org/licenses/>.
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
23 ##
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
24 ########################################################################
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5969
diff changeset
25
22389
663e30242c4b avoid using "expected failure" to describe known bugs
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
26 ## FIXME: we should skip (or mark as a known bug) the test for
8871
fb1c929dbbb7 tests vs. 64-bit indexing
John W. Eaton <jwe@octave.org>
parents: 8746
diff changeset
27 ## saving sparse matrices to MAT files when using 64-bit indexing since
fb1c929dbbb7 tests vs. 64-bit indexing
John W. Eaton <jwe@octave.org>
parents: 8746
diff changeset
28 ## that is not implemented yet.
fb1c929dbbb7 tests vs. 64-bit indexing
John W. Eaton <jwe@octave.org>
parents: 8746
diff changeset
29
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
30 %!function [ret, files] = testls (input)
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
31 %! ## flag a1 global so as to test the storage of global flags
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
32 %! global a1;
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
33 %!
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
34 %! ## Input or output, so as to be able to exchange between versions
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
35 %! if (nargin < 1)
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
36 %! input = 0;
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
37 %! endif
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
38 %!
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
39 %! ## Setup some variable to be saved or compared to loaded variables
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
40 %!
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
41 %! ## scalar
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
42 %! a1 = 1;
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
43 %! ## matrix
16213
b1283d4c06c2 test: Use Octave coding standards for scripts in test/ directory.
Rik <rik@octave.org>
parents: 16030
diff changeset
44 %! persistent a2 = hilb (3);
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
45 %! ## complex scalar
5969
b305d2d925d8 [project @ 2006-08-25 14:13:52 by jwe]
jwe
parents: 5952
diff changeset
46 %! persistent a3 = 1 + 1i;
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
47 %! ## complex matrix
16213
b1283d4c06c2 test: Use Octave coding standards for scripts in test/ directory.
Rik <rik@octave.org>
parents: 16030
diff changeset
48 %! persistent a4 = hilb (3) + 1i*hilb (3);
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
49 %! ## bool
5969
b305d2d925d8 [project @ 2006-08-25 14:13:52 by jwe]
jwe
parents: 5952
diff changeset
50 %! persistent a5 = (1 == 1);
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
51 %! ## bool matrix
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
52 %! persistent a6 = ([ones(1,5), zeros(1,5)] == ones (1,10));
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
53 %! ## range
5969
b305d2d925d8 [project @ 2006-08-25 14:13:52 by jwe]
jwe
parents: 5952
diff changeset
54 %! persistent a7 = 1:10;
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
55 %! ## structure
5969
b305d2d925d8 [project @ 2006-08-25 14:13:52 by jwe]
jwe
parents: 5952
diff changeset
56 %! persistent a8 = struct ("a", a1, "b", a3);
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
57 %! ## cell array
5969
b305d2d925d8 [project @ 2006-08-25 14:13:52 by jwe]
jwe
parents: 5952
diff changeset
58 %! persistent a9 = {a1, a3};
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
59 %! ## string
5969
b305d2d925d8 [project @ 2006-08-25 14:13:52 by jwe]
jwe
parents: 5952
diff changeset
60 %! persistent a10 = ["test"; "strings"];
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
61 %! ## int8 array
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
62 %! persistent a11 = int8 (floor (256*rand (2,2)));
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
63 %! ## int16 array
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
64 %! persistent a12 = int16 (floor (65536*rand (2,2)));
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
65 %! ## int32 array
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
66 %! persistent a13 = int32 (floor (1e6*rand (2,2)));
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
67 %! ## int64 array
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
68 %! persistent a14 = int64 (floor (10*rand (2,2)));
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
69 %! ## uint8 array
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
70 %! persistent a15 = uint8 (floor (256*rand (2,2)));
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
71 %! ## uint16 array
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
72 %! persistent a16 = uint16 (floor (65536*rand (2,2)));
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
73 %! ## int32 array
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
74 %! persistent a17 = uint32 (floor (1e6*rand (2,2)));
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
75 %! ## uint64 array
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
76 %! persistent a18 = uint64 (floor (10*rand (2,2)));
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
77 %! ## sparse
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
78 %! persistent a19 = sprandn (100,100,0.01);
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
79 %! ## complex sparse
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
80 %! persistent a20 = sprandn (100,100,0.01) + 1i * sprandn (100,100,0.01);
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
81 %!
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
82 %! ret = 0;
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
83 %!
19595
be7ac98fab43 strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents: 19345
diff changeset
84 %! files = cellfun (@fullfile, {P_tmpdir},
be7ac98fab43 strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents: 19345
diff changeset
85 %! {"text.mat", "binary.mat", "mat5.mat", "mat7.mat"},
18173
85d45717b28d Save files to P_tmpdir in tests
Carlo de Falco <cdf@users.sourceforge.net>
parents: 17744
diff changeset
86 %! "UniformOutput", false);
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
87 %! opts = {"-z -text", "-z -binary", "-z -mat", "-v7"};
5969
b305d2d925d8 [project @ 2006-08-25 14:13:52 by jwe]
jwe
parents: 5952
diff changeset
88 %! tols = {2*eps, 0, 0, 0};
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
89 %!
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
90 %! vars = "a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 a20";
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
91 %! if (! input)
5969
b305d2d925d8 [project @ 2006-08-25 14:13:52 by jwe]
jwe
parents: 5952
diff changeset
92 %! for i = 1:length (files)
5950
2b2e5a937c59 [project @ 2006-08-22 04:42:36 by jwe]
jwe
parents: 5948
diff changeset
93 %! eval (sprintf ("save %s %s %s", opts{i}, files{i}, vars));
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
94 %! endfor
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
95 %! else
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
96 %! b1 = a1; b2 = a2; b3 = a3; b4 = a4; b5 = a5;
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
97 %! b6 = a6; b7 = a7; b8 = a8; b9 = a9;
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
98 %! b10 = a10; b11 = a11; b12 = a12; b13 = a13; b14 = a14; b15 = a15;
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
99 %! b16 = a16; b17 = a17; b18 = a18; b19 = a19; b20 = a20;
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
100 %!
5969
b305d2d925d8 [project @ 2006-08-25 14:13:52 by jwe]
jwe
parents: 5952
diff changeset
101 %! for i = length (files)
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
102 %!
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
103 %! clear a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a19 a20;
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
104 %!
5969
b305d2d925d8 [project @ 2006-08-25 14:13:52 by jwe]
jwe
parents: 5952
diff changeset
105 %! file = files{i};
b305d2d925d8 [project @ 2006-08-25 14:13:52 by jwe]
jwe
parents: 5952
diff changeset
106 %! tol = tols{i};
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
107 %!
5948
8b4d38c76bfa [project @ 2006-08-22 01:20:22 by jwe]
jwe
parents: 5775
diff changeset
108 %! load (file);
8b4d38c76bfa [project @ 2006-08-22 01:20:22 by jwe]
jwe
parents: 5775
diff changeset
109 %!
5969
b305d2d925d8 [project @ 2006-08-25 14:13:52 by jwe]
jwe
parents: 5952
diff changeset
110 %! assert (a1, b1, tol);
b305d2d925d8 [project @ 2006-08-25 14:13:52 by jwe]
jwe
parents: 5952
diff changeset
111 %! assert (a2, b2, tol);
b305d2d925d8 [project @ 2006-08-25 14:13:52 by jwe]
jwe
parents: 5952
diff changeset
112 %! assert (a3, b3, tol);
b305d2d925d8 [project @ 2006-08-25 14:13:52 by jwe]
jwe
parents: 5952
diff changeset
113 %! assert (a4, b4, tol);
5948
8b4d38c76bfa [project @ 2006-08-22 01:20:22 by jwe]
jwe
parents: 5775
diff changeset
114 %!
8b4d38c76bfa [project @ 2006-08-22 01:20:22 by jwe]
jwe
parents: 5775
diff changeset
115 %! if (! isequal (a5, b5))
11033
d9c8916bb9dd Untabify a few remaining .m scripts.
Rik <octave@nomad.inbox5.com>
parents: 9112
diff changeset
116 %! error ("failed: %s boolean", file);
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
117 %! endif
5948
8b4d38c76bfa [project @ 2006-08-22 01:20:22 by jwe]
jwe
parents: 5775
diff changeset
118 %!
8b4d38c76bfa [project @ 2006-08-22 01:20:22 by jwe]
jwe
parents: 5775
diff changeset
119 %! if (! strcmp (file, "mat5") && ! strcmp (file, "mat7"))
8b4d38c76bfa [project @ 2006-08-22 01:20:22 by jwe]
jwe
parents: 5775
diff changeset
120 %! if (! isequal (a6, b6))
11033
d9c8916bb9dd Untabify a few remaining .m scripts.
Rik <octave@nomad.inbox5.com>
parents: 9112
diff changeset
121 %! error ("failed: %s boolean matrix", file);
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
122 %! endif
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
123 %! endif
5948
8b4d38c76bfa [project @ 2006-08-22 01:20:22 by jwe]
jwe
parents: 5775
diff changeset
124 %!
5969
b305d2d925d8 [project @ 2006-08-25 14:13:52 by jwe]
jwe
parents: 5952
diff changeset
125 %! assert ([a7], [b7], tol);
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
126 %!
5948
8b4d38c76bfa [project @ 2006-08-22 01:20:22 by jwe]
jwe
parents: 5775
diff changeset
127 %! if (! isequal (a8, b8))
11033
d9c8916bb9dd Untabify a few remaining .m scripts.
Rik <octave@nomad.inbox5.com>
parents: 9112
diff changeset
128 %! error ("failed: %s struct", file);
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
129 %! endif
16215
6fe6ac8bbfdb test: Remove trailing spaces from ends of lines in test/ directory.
Rik <rik@octave.org>
parents: 16213
diff changeset
130 %!
5948
8b4d38c76bfa [project @ 2006-08-22 01:20:22 by jwe]
jwe
parents: 5775
diff changeset
131 %! if (! isequal (a9, b9))
11033
d9c8916bb9dd Untabify a few remaining .m scripts.
Rik <octave@nomad.inbox5.com>
parents: 9112
diff changeset
132 %! error ("failed: %s cell", file);
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
133 %! endif
16215
6fe6ac8bbfdb test: Remove trailing spaces from ends of lines in test/ directory.
Rik <rik@octave.org>
parents: 16213
diff changeset
134 %!
5948
8b4d38c76bfa [project @ 2006-08-22 01:20:22 by jwe]
jwe
parents: 5775
diff changeset
135 %! if (! isequal (a10, b10))
11033
d9c8916bb9dd Untabify a few remaining .m scripts.
Rik <octave@nomad.inbox5.com>
parents: 9112
diff changeset
136 %! error ("failed: %s string", file);
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
137 %! endif
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
138 %!
5948
8b4d38c76bfa [project @ 2006-08-22 01:20:22 by jwe]
jwe
parents: 5775
diff changeset
139 %! if (! isequal (a11, b11))
11033
d9c8916bb9dd Untabify a few remaining .m scripts.
Rik <octave@nomad.inbox5.com>
parents: 9112
diff changeset
140 %! error ("failed: %s int8", file);
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
141 %! endif
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
142 %!
5948
8b4d38c76bfa [project @ 2006-08-22 01:20:22 by jwe]
jwe
parents: 5775
diff changeset
143 %! if (! isequal (a12, b12))
11033
d9c8916bb9dd Untabify a few remaining .m scripts.
Rik <octave@nomad.inbox5.com>
parents: 9112
diff changeset
144 %! error ("failed: %s int16", file);
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
145 %! endif
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
146 %!
5948
8b4d38c76bfa [project @ 2006-08-22 01:20:22 by jwe]
jwe
parents: 5775
diff changeset
147 %! if (! isequal (a13, b13))
11033
d9c8916bb9dd Untabify a few remaining .m scripts.
Rik <octave@nomad.inbox5.com>
parents: 9112
diff changeset
148 %! error ("failed: %s int32", file);
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
149 %! endif
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
150 %!
5948
8b4d38c76bfa [project @ 2006-08-22 01:20:22 by jwe]
jwe
parents: 5775
diff changeset
151 %! if (! isequal (a14, b14))
11033
d9c8916bb9dd Untabify a few remaining .m scripts.
Rik <octave@nomad.inbox5.com>
parents: 9112
diff changeset
152 %! error ("failed: %s int64", file);
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
153 %! endif
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
154 %!
5948
8b4d38c76bfa [project @ 2006-08-22 01:20:22 by jwe]
jwe
parents: 5775
diff changeset
155 %! if (! isequal (a15, b15))
11033
d9c8916bb9dd Untabify a few remaining .m scripts.
Rik <octave@nomad.inbox5.com>
parents: 9112
diff changeset
156 %! error ("failed: %s uint8", file);
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
157 %! endif
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
158 %!
5948
8b4d38c76bfa [project @ 2006-08-22 01:20:22 by jwe]
jwe
parents: 5775
diff changeset
159 %! if (! isequal (a16, b16))
11033
d9c8916bb9dd Untabify a few remaining .m scripts.
Rik <octave@nomad.inbox5.com>
parents: 9112
diff changeset
160 %! error ("failed: %s uint16", file);
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
161 %! endif
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
162 %!
5948
8b4d38c76bfa [project @ 2006-08-22 01:20:22 by jwe]
jwe
parents: 5775
diff changeset
163 %! if (! isequal (a17, b17))
11033
d9c8916bb9dd Untabify a few remaining .m scripts.
Rik <octave@nomad.inbox5.com>
parents: 9112
diff changeset
164 %! error ("failed: %s uint32", file);
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
165 %! endif
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
166 %!
5948
8b4d38c76bfa [project @ 2006-08-22 01:20:22 by jwe]
jwe
parents: 5775
diff changeset
167 %! if (! isequal (a18, b18))
11033
d9c8916bb9dd Untabify a few remaining .m scripts.
Rik <octave@nomad.inbox5.com>
parents: 9112
diff changeset
168 %! error ("failed: %s uint64", file);
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
169 %! endif
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
170 %!
5969
b305d2d925d8 [project @ 2006-08-25 14:13:52 by jwe]
jwe
parents: 5952
diff changeset
171 %! assert (a19, b19, tol);
b305d2d925d8 [project @ 2006-08-25 14:13:52 by jwe]
jwe
parents: 5952
diff changeset
172 %! assert (a20, b20, tol);
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
173 %!
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
174 %! ## Test for global flags
5948
8b4d38c76bfa [project @ 2006-08-22 01:20:22 by jwe]
jwe
parents: 5775
diff changeset
175 %! if (! isglobal ("a1") || isglobal ("a2") || isglobal ("a3")
8b4d38c76bfa [project @ 2006-08-22 01:20:22 by jwe]
jwe
parents: 5775
diff changeset
176 %! || isglobal ("a4") || isglobal ("a5") || isglobal ("a6")
8b4d38c76bfa [project @ 2006-08-22 01:20:22 by jwe]
jwe
parents: 5775
diff changeset
177 %! || isglobal ("a7") || isglobal ("a8") || isglobal ("a9")
8b4d38c76bfa [project @ 2006-08-22 01:20:22 by jwe]
jwe
parents: 5775
diff changeset
178 %! || isglobal ("a10") || isglobal ("a11") || isglobal ("a12")
8b4d38c76bfa [project @ 2006-08-22 01:20:22 by jwe]
jwe
parents: 5775
diff changeset
179 %! || isglobal ("a13") || isglobal ("a14") || isglobal ("a15")
8b4d38c76bfa [project @ 2006-08-22 01:20:22 by jwe]
jwe
parents: 5775
diff changeset
180 %! || isglobal ("a16") || isglobal ("a17") || isglobal ("a18")
8b4d38c76bfa [project @ 2006-08-22 01:20:22 by jwe]
jwe
parents: 5775
diff changeset
181 %! || isglobal ("a19") || isglobal ("a20"))
16215
6fe6ac8bbfdb test: Remove trailing spaces from ends of lines in test/ directory.
Rik <rik@octave.org>
parents: 16213
diff changeset
182 %! error ("failed: %s global test", file);
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
183 %! endif
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
184 %! endfor
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
185 %! endif
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
186 %!
25661
e189ee5cd537 io.tst: Clear global variable a1 at end of test to avoid leaking vars.
Rik <rik@octave.org>
parents: 25505
diff changeset
187 %! ## Cleanup after test
e189ee5cd537 io.tst: Clear global variable a1 at end of test to avoid leaking vars.
Rik <rik@octave.org>
parents: 25505
diff changeset
188 %! clear -global a1;
e189ee5cd537 io.tst: Clear global variable a1 at end of test to avoid leaking vars.
Rik <rik@octave.org>
parents: 25505
diff changeset
189 %!
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
190 %! ret = 1;
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
191 %!endfunction
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
192
17288
88a6f2f540ad io.tst: Condition load-save test on HAVE_ZLIB
Mike Miller <mtmiller@ieee.org>
parents: 16994
diff changeset
193 %!testif HAVE_ZLIB
16215
6fe6ac8bbfdb test: Remove trailing spaces from ends of lines in test/ directory.
Rik <rik@octave.org>
parents: 16213
diff changeset
194 %!
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
195 %! [save_status, save_files] = testls (0);
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
196 %! [load_status, load_files] = testls (1);
16215
6fe6ac8bbfdb test: Remove trailing spaces from ends of lines in test/ directory.
Rik <rik@octave.org>
parents: 16213
diff changeset
197 %!
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
198 %! for f = [save_files, load_files]
28098
501553fcf6e2 unlink: throw error if operation fails and nargout == 0 (bug #57830).
Rik <rik@octave.org>
parents: 27923
diff changeset
199 %! sts = unlink (f{1});
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
200 %! endfor
16215
6fe6ac8bbfdb test: Remove trailing spaces from ends of lines in test/ directory.
Rik <rik@octave.org>
parents: 16213
diff changeset
201 %!
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
202 %! assert (save_status && load_status);
26182
34617dd78f02 avoid possible leaked global variables in tests
John W. Eaton <jwe@octave.org>
parents: 25675
diff changeset
203 %! clear -global a1; # cleanup after test
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
204
20257
d54aa96abadf Fix load/save of integers with -hdf5 (bug #45225)
Mike Miller <mtmiller@octave.org>
parents: 20256
diff changeset
205 %!testif HAVE_HDF5
d54aa96abadf Fix load/save of integers with -hdf5 (bug #45225)
Mike Miller <mtmiller@octave.org>
parents: 20256
diff changeset
206 %!
d54aa96abadf Fix load/save of integers with -hdf5 (bug #45225)
Mike Miller <mtmiller@octave.org>
parents: 20256
diff changeset
207 %! s8 = int8 (fix ((2^8 - 1) * (rand (2, 2) - 0.5)));
d54aa96abadf Fix load/save of integers with -hdf5 (bug #45225)
Mike Miller <mtmiller@octave.org>
parents: 20256
diff changeset
208 %! u8 = uint8 (fix ((2^8 - 1) * (rand (2, 2) - 0.5)));
d54aa96abadf Fix load/save of integers with -hdf5 (bug #45225)
Mike Miller <mtmiller@octave.org>
parents: 20256
diff changeset
209 %! s16 = int16 (fix ((2^16 - 1) * (rand (2, 2) - 0.5)));
d54aa96abadf Fix load/save of integers with -hdf5 (bug #45225)
Mike Miller <mtmiller@octave.org>
parents: 20256
diff changeset
210 %! u16 = uint16 (fix ((2^16 - 1) * (rand (2, 2) - 0.5)));
d54aa96abadf Fix load/save of integers with -hdf5 (bug #45225)
Mike Miller <mtmiller@octave.org>
parents: 20256
diff changeset
211 %! s32 = int32 (fix ((2^32 - 1) * (rand (2, 2) - 0.5)));
d54aa96abadf Fix load/save of integers with -hdf5 (bug #45225)
Mike Miller <mtmiller@octave.org>
parents: 20256
diff changeset
212 %! u32 = uint32 (fix ((2^32 - 1) * (rand (2, 2) - 0.5)));
d54aa96abadf Fix load/save of integers with -hdf5 (bug #45225)
Mike Miller <mtmiller@octave.org>
parents: 20256
diff changeset
213 %! s64 = int64 (fix ((2^64 - 1) * (rand (2, 2) - 0.5)));
d54aa96abadf Fix load/save of integers with -hdf5 (bug #45225)
Mike Miller <mtmiller@octave.org>
parents: 20256
diff changeset
214 %! u64 = uint64 (fix ((2^64 - 1) * (rand (2, 2) - 0.5)));
d54aa96abadf Fix load/save of integers with -hdf5 (bug #45225)
Mike Miller <mtmiller@octave.org>
parents: 20256
diff changeset
215 %! s8t = s8; u8t = u8; s16t = s16; u16t = u16; s32t = s32; u32t = u32;
d54aa96abadf Fix load/save of integers with -hdf5 (bug #45225)
Mike Miller <mtmiller@octave.org>
parents: 20256
diff changeset
216 %! s64t = s64; u64t = u64;
d54aa96abadf Fix load/save of integers with -hdf5 (bug #45225)
Mike Miller <mtmiller@octave.org>
parents: 20256
diff changeset
217 %! h5file = tempname ();
d54aa96abadf Fix load/save of integers with -hdf5 (bug #45225)
Mike Miller <mtmiller@octave.org>
parents: 20256
diff changeset
218 %! unwind_protect
d54aa96abadf Fix load/save of integers with -hdf5 (bug #45225)
Mike Miller <mtmiller@octave.org>
parents: 20256
diff changeset
219 %! eval (sprintf ("save -hdf5 %s %s", h5file, "s8 u8 s16 u16 s32 u32 s64 u64"));
d54aa96abadf Fix load/save of integers with -hdf5 (bug #45225)
Mike Miller <mtmiller@octave.org>
parents: 20256
diff changeset
220 %! clear s8 u8 s16 u16 s32 u32 s64 u64;
d54aa96abadf Fix load/save of integers with -hdf5 (bug #45225)
Mike Miller <mtmiller@octave.org>
parents: 20256
diff changeset
221 %! load (h5file);
d54aa96abadf Fix load/save of integers with -hdf5 (bug #45225)
Mike Miller <mtmiller@octave.org>
parents: 20256
diff changeset
222 %! assert (s8, s8t);
d54aa96abadf Fix load/save of integers with -hdf5 (bug #45225)
Mike Miller <mtmiller@octave.org>
parents: 20256
diff changeset
223 %! assert (u8, u8t);
d54aa96abadf Fix load/save of integers with -hdf5 (bug #45225)
Mike Miller <mtmiller@octave.org>
parents: 20256
diff changeset
224 %! assert (s16, s16t);
d54aa96abadf Fix load/save of integers with -hdf5 (bug #45225)
Mike Miller <mtmiller@octave.org>
parents: 20256
diff changeset
225 %! assert (u16, u16t);
d54aa96abadf Fix load/save of integers with -hdf5 (bug #45225)
Mike Miller <mtmiller@octave.org>
parents: 20256
diff changeset
226 %! assert (s32, s32t);
d54aa96abadf Fix load/save of integers with -hdf5 (bug #45225)
Mike Miller <mtmiller@octave.org>
parents: 20256
diff changeset
227 %! assert (u32, u32t);
d54aa96abadf Fix load/save of integers with -hdf5 (bug #45225)
Mike Miller <mtmiller@octave.org>
parents: 20256
diff changeset
228 %! assert (s64, s64t);
d54aa96abadf Fix load/save of integers with -hdf5 (bug #45225)
Mike Miller <mtmiller@octave.org>
parents: 20256
diff changeset
229 %! assert (u64, u64t);
d54aa96abadf Fix load/save of integers with -hdf5 (bug #45225)
Mike Miller <mtmiller@octave.org>
parents: 20256
diff changeset
230 %! unwind_protect_cleanup
28098
501553fcf6e2 unlink: throw error if operation fails and nargout == 0 (bug #57830).
Rik <rik@octave.org>
parents: 27923
diff changeset
231 %! sts = unlink (h5file);
20257
d54aa96abadf Fix load/save of integers with -hdf5 (bug #45225)
Mike Miller <mtmiller@octave.org>
parents: 20256
diff changeset
232 %! end_unwind_protect
d54aa96abadf Fix load/save of integers with -hdf5 (bug #45225)
Mike Miller <mtmiller@octave.org>
parents: 20256
diff changeset
233
7635
ba7a3e20ee3d add -struct modifier to save
Jaroslav Hajek <highegg@gmail.com>
parents: 7540
diff changeset
234 %!test
16215
6fe6ac8bbfdb test: Remove trailing spaces from ends of lines in test/ directory.
Rik <rik@octave.org>
parents: 16213
diff changeset
235 %!
7635
ba7a3e20ee3d add -struct modifier to save
Jaroslav Hajek <highegg@gmail.com>
parents: 7540
diff changeset
236 %! STR.scalar_fld = 1;
ba7a3e20ee3d add -struct modifier to save
Jaroslav Hajek <highegg@gmail.com>
parents: 7540
diff changeset
237 %! STR.matrix_fld = [1.1,2;3,4];
ba7a3e20ee3d add -struct modifier to save
Jaroslav Hajek <highegg@gmail.com>
parents: 7540
diff changeset
238 %! STR.string_fld = "Octave";
ba7a3e20ee3d add -struct modifier to save
Jaroslav Hajek <highegg@gmail.com>
parents: 7540
diff changeset
239 %! STR.struct_fld.x = 0;
ba7a3e20ee3d add -struct modifier to save
Jaroslav Hajek <highegg@gmail.com>
parents: 7540
diff changeset
240 %! STR.struct_fld.y = 1;
19595
be7ac98fab43 strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents: 19345
diff changeset
241 %!
18173
85d45717b28d Save files to P_tmpdir in tests
Carlo de Falco <cdf@users.sourceforge.net>
parents: 17744
diff changeset
242 %! struct_dat = fullfile (P_tmpdir, "struct.dat");
26698
63b5a17ba30f Use save_default_options() to make BIST test suite robust against user configurations.
Rik <rik@octave.org>
parents: 26376
diff changeset
243 %! save_default_options ("-text", "local");
26717
87d3baf1c024 Harden BIST tests against changes in save_precision().
Rik <rik@octave.org>
parents: 26706
diff changeset
244 %! save_precision (17, "local");
18173
85d45717b28d Save files to P_tmpdir in tests
Carlo de Falco <cdf@users.sourceforge.net>
parents: 17744
diff changeset
245 %! save (struct_dat, "-struct", "STR");
85d45717b28d Save files to P_tmpdir in tests
Carlo de Falco <cdf@users.sourceforge.net>
parents: 17744
diff changeset
246 %! STR = load (struct_dat);
7635
ba7a3e20ee3d add -struct modifier to save
Jaroslav Hajek <highegg@gmail.com>
parents: 7540
diff changeset
247 %!
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
248 %! assert (STR.scalar_fld == 1 && ...
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
249 %! STR.matrix_fld == [1.1,2;3,4] && ...
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
250 %! STR.string_fld == "Octave" && ...
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
251 %! STR.struct_fld.x == 0 && ...
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
252 %! STR.struct_fld.y == 1 );
7635
ba7a3e20ee3d add -struct modifier to save
Jaroslav Hajek <highegg@gmail.com>
parents: 7540
diff changeset
253 %!
19595
be7ac98fab43 strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents: 19345
diff changeset
254 %!
be7ac98fab43 strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents: 19345
diff changeset
255 %! save ("-binary", struct_dat,
18173
85d45717b28d Save files to P_tmpdir in tests
Carlo de Falco <cdf@users.sourceforge.net>
parents: 17744
diff changeset
256 %! "-struct", "STR", "matrix_fld", "str*_fld");
21568
3d60ed163b70 maint: Eliminate bad spacing around '='.
Rik <rik@octave.org>
parents: 21458
diff changeset
257 %! STR = load (struct_dat);
7635
ba7a3e20ee3d add -struct modifier to save
Jaroslav Hajek <highegg@gmail.com>
parents: 7540
diff changeset
258 %!
16213
b1283d4c06c2 test: Use Octave coding standards for scripts in test/ directory.
Rik <rik@octave.org>
parents: 16030
diff changeset
259 %! assert (!isfield (STR,"scalar_fld") && ...
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
260 %! STR.matrix_fld == [1.1,2;3,4] && ...
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
261 %! STR.string_fld == "Octave" && ...
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
262 %! STR.struct_fld.x == 0 && ...
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
263 %! STR.struct_fld.y == 1);
7635
ba7a3e20ee3d add -struct modifier to save
Jaroslav Hajek <highegg@gmail.com>
parents: 7540
diff changeset
264 %!
18173
85d45717b28d Save files to P_tmpdir in tests
Carlo de Falco <cdf@users.sourceforge.net>
parents: 17744
diff changeset
265 %! delete (struct_dat);
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
266
9102
9dc516d36175 Add a test for saving and reading a matrix with the "-ascii" format
Carlo de Falco <carlo.defalco@gmail.com>
parents: 8920
diff changeset
267 %!test
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
268 %! matrix1 = rand (100, 2);
18173
85d45717b28d Save files to P_tmpdir in tests
Carlo de Falco <cdf@users.sourceforge.net>
parents: 17744
diff changeset
269 %! matrix_ascii = fullfile (P_tmpdir, "matrix.ascii");
21580
ecce63c99c3f maint: Add semicolons to terminate code in %! blocks.
Rik <rik@octave.org>
parents: 21568
diff changeset
270 %! save ("-ascii", matrix_ascii, "matrix1");
18173
85d45717b28d Save files to P_tmpdir in tests
Carlo de Falco <cdf@users.sourceforge.net>
parents: 17744
diff changeset
271 %! matrix2 = load (matrix_ascii);
17292
c5073ed27cdc Handle '+' format modifier in sprintf (bug #39773)
Rik <rik@octave.org>
parents: 17288
diff changeset
272 %! assert (matrix1, matrix2, 1e-9);
9102
9dc516d36175 Add a test for saving and reading a matrix with the "-ascii" format
Carlo de Falco <carlo.defalco@gmail.com>
parents: 8920
diff changeset
273 %!
18173
85d45717b28d Save files to P_tmpdir in tests
Carlo de Falco <cdf@users.sourceforge.net>
parents: 17744
diff changeset
274 %! delete (matrix_ascii);
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
275
14268
61db003b8e47 Avoid segfault on empty load command
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
276 %!error <unable to find file> load ("")
61db003b8e47 Avoid segfault on empty load command
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
277
21634
96518f623c91 Backed out changeset dcf8922b724b
Mike Miller <mtmiller@octave.org>
parents: 21633
diff changeset
278 %% FIXME: This test is disabled as it writes to stdout and there is no easy
96518f623c91 Backed out changeset dcf8922b724b
Mike Miller <mtmiller@octave.org>
parents: 21633
diff changeset
279 %% way to recover output. Need to spawn new octave process and pipe stdout
96518f623c91 Backed out changeset dcf8922b724b
Mike Miller <mtmiller@octave.org>
parents: 21633
diff changeset
280 %% somewhere to treat this case.
96518f623c91 Backed out changeset dcf8922b724b
Mike Miller <mtmiller@octave.org>
parents: 21633
diff changeset
281 %!#test
96518f623c91 Backed out changeset dcf8922b724b
Mike Miller <mtmiller@octave.org>
parents: 21633
diff changeset
282 %! puts ("foo\n");
96518f623c91 Backed out changeset dcf8922b724b
Mike Miller <mtmiller@octave.org>
parents: 21633
diff changeset
283
96518f623c91 Backed out changeset dcf8922b724b
Mike Miller <mtmiller@octave.org>
parents: 21633
diff changeset
284 %!assert (puts (1),-1)
96518f623c91 Backed out changeset dcf8922b724b
Mike Miller <mtmiller@octave.org>
parents: 21633
diff changeset
285
96518f623c91 Backed out changeset dcf8922b724b
Mike Miller <mtmiller@octave.org>
parents: 21633
diff changeset
286 %!error <Invalid call to puts> puts ()
96518f623c91 Backed out changeset dcf8922b724b
Mike Miller <mtmiller@octave.org>
parents: 21633
diff changeset
287 %!error <Invalid call to puts> puts (1, 2)
96518f623c91 Backed out changeset dcf8922b724b
Mike Miller <mtmiller@octave.org>
parents: 21633
diff changeset
288
12984
7626f8934466 correctly resize scanf output for %c formats (bug #34037)
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
289 %!assert (sscanf ('123456', '%10c'), '123456')
7626f8934466 correctly resize scanf output for %c formats (bug #34037)
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
290 %!assert (sscanf ('123456', '%10s'), '123456')
7626f8934466 correctly resize scanf output for %c formats (bug #34037)
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
291
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
292 %!assert (sscanf (['ab'; 'cd'], '%s'), 'acbd')
13194
3e1871badab9 allow sscanf to accept character arrays with more than one row
John W. Eaton <jwe@octave.org>
parents: 13009
diff changeset
293
17292
c5073ed27cdc Handle '+' format modifier in sprintf (bug #39773)
Rik <rik@octave.org>
parents: 17288
diff changeset
294 %!assert (sscanf ('02:08:30', '%i:%i:%i'), [2; 0])
c5073ed27cdc Handle '+' format modifier in sprintf (bug #39773)
Rik <rik@octave.org>
parents: 17288
diff changeset
295 %!assert (sscanf ('02:08:30', '%d:%d:%d'), [2; 8; 30])
14675
757f729fd41d skip leading whitespace for scanf %i format
John W. Eaton <jwe@octave.org>
parents: 14268
diff changeset
296
17292
c5073ed27cdc Handle '+' format modifier in sprintf (bug #39773)
Rik <rik@octave.org>
parents: 17288
diff changeset
297 %!assert (sscanf ('0177 08', '%i'), [127; 0; 8])
c5073ed27cdc Handle '+' format modifier in sprintf (bug #39773)
Rik <rik@octave.org>
parents: 17288
diff changeset
298 %!assert (sscanf ('0177 08', '%d'), [177; 8])
14675
757f729fd41d skip leading whitespace for scanf %i format
John W. Eaton <jwe@octave.org>
parents: 14268
diff changeset
299
21686
f07d6f579214 scanf: use appropriate sized types for integer conversions (bug #47741)
Mike Miller <mtmiller@octave.org>
parents: 21634
diff changeset
300 ## bug #47741
f07d6f579214 scanf: use appropriate sized types for integer conversions (bug #47741)
Mike Miller <mtmiller@octave.org>
parents: 21634
diff changeset
301 %!assert (sscanf ('2147483647', '%d'), 2147483647)
f07d6f579214 scanf: use appropriate sized types for integer conversions (bug #47741)
Mike Miller <mtmiller@octave.org>
parents: 21634
diff changeset
302 %!assert (sscanf ('2147483647', '%i'), 2147483647)
f07d6f579214 scanf: use appropriate sized types for integer conversions (bug #47741)
Mike Miller <mtmiller@octave.org>
parents: 21634
diff changeset
303 %!assert (sscanf ('4294967295', '%u'), 4294967295)
f07d6f579214 scanf: use appropriate sized types for integer conversions (bug #47741)
Mike Miller <mtmiller@octave.org>
parents: 21634
diff changeset
304 %!assert (sscanf ('37777777777', '%o'), 4294967295)
f07d6f579214 scanf: use appropriate sized types for integer conversions (bug #47741)
Mike Miller <mtmiller@octave.org>
parents: 21634
diff changeset
305 %!assert (sscanf ('ffffffff', '%x'), 4294967295)
f07d6f579214 scanf: use appropriate sized types for integer conversions (bug #47741)
Mike Miller <mtmiller@octave.org>
parents: 21634
diff changeset
306 ## FIXME: scanf should return int64/uint64 if all conversions are %l[dioux].
f07d6f579214 scanf: use appropriate sized types for integer conversions (bug #47741)
Mike Miller <mtmiller@octave.org>
parents: 21634
diff changeset
307 ## Until then only test values that are within precision range of a double.
f07d6f579214 scanf: use appropriate sized types for integer conversions (bug #47741)
Mike Miller <mtmiller@octave.org>
parents: 21634
diff changeset
308 %!assert (sscanf ('281474976710655', '%ld'), 281474976710655)
f07d6f579214 scanf: use appropriate sized types for integer conversions (bug #47741)
Mike Miller <mtmiller@octave.org>
parents: 21634
diff changeset
309 %!assert (sscanf ('281474976710655', '%li'), 281474976710655)
f07d6f579214 scanf: use appropriate sized types for integer conversions (bug #47741)
Mike Miller <mtmiller@octave.org>
parents: 21634
diff changeset
310 %!assert (sscanf ('281474976710655', '%lu'), 281474976710655)
f07d6f579214 scanf: use appropriate sized types for integer conversions (bug #47741)
Mike Miller <mtmiller@octave.org>
parents: 21634
diff changeset
311 %!assert (sscanf ('7777777777777777', '%lo'), 281474976710655)
f07d6f579214 scanf: use appropriate sized types for integer conversions (bug #47741)
Mike Miller <mtmiller@octave.org>
parents: 21634
diff changeset
312 %!assert (sscanf ('ffffffffffff', '%lx'), 281474976710655)
f07d6f579214 scanf: use appropriate sized types for integer conversions (bug #47741)
Mike Miller <mtmiller@octave.org>
parents: 21634
diff changeset
313
21687
4418e579cca6 scanf: return maximum/minimum value on integer overflow (bug #47759)
Mike Miller <mtmiller@octave.org>
parents: 21686
diff changeset
314 ## bug #47759
4418e579cca6 scanf: return maximum/minimum value on integer overflow (bug #47759)
Mike Miller <mtmiller@octave.org>
parents: 21686
diff changeset
315 %!assert (sscanf ('999999999999999', '%d'), double (intmax ("int32")))
4418e579cca6 scanf: return maximum/minimum value on integer overflow (bug #47759)
Mike Miller <mtmiller@octave.org>
parents: 21686
diff changeset
316 %!assert (sscanf ('999999999999999', '%i'), double (intmax ("int32")))
4418e579cca6 scanf: return maximum/minimum value on integer overflow (bug #47759)
Mike Miller <mtmiller@octave.org>
parents: 21686
diff changeset
317 %!assert (sscanf ('999999999999999', '%u'), double (intmax ("uint32")))
4418e579cca6 scanf: return maximum/minimum value on integer overflow (bug #47759)
Mike Miller <mtmiller@octave.org>
parents: 21686
diff changeset
318 %!assert (sscanf ('777777777777777', '%o'), double (intmax ("uint32")))
4418e579cca6 scanf: return maximum/minimum value on integer overflow (bug #47759)
Mike Miller <mtmiller@octave.org>
parents: 21686
diff changeset
319 %!assert (sscanf ('fffffffffffffff', '%x'), double (intmax ("uint32")))
4418e579cca6 scanf: return maximum/minimum value on integer overflow (bug #47759)
Mike Miller <mtmiller@octave.org>
parents: 21686
diff changeset
320 ## FIXME: scanf should return int64/uint64 if all conversions are %l[dioux].
4418e579cca6 scanf: return maximum/minimum value on integer overflow (bug #47759)
Mike Miller <mtmiller@octave.org>
parents: 21686
diff changeset
321 ## Until then cast to a double (and lose precision) for comparison.
4418e579cca6 scanf: return maximum/minimum value on integer overflow (bug #47759)
Mike Miller <mtmiller@octave.org>
parents: 21686
diff changeset
322 %!assert (sscanf ('9999999999999999999999', '%ld'), double (intmax ("int64")))
4418e579cca6 scanf: return maximum/minimum value on integer overflow (bug #47759)
Mike Miller <mtmiller@octave.org>
parents: 21686
diff changeset
323 %!assert (sscanf ('9999999999999999999999', '%li'), double (intmax ("int64")))
4418e579cca6 scanf: return maximum/minimum value on integer overflow (bug #47759)
Mike Miller <mtmiller@octave.org>
parents: 21686
diff changeset
324 %!assert (sscanf ('9999999999999999999999', '%lu'), double (intmax ("uint64")))
4418e579cca6 scanf: return maximum/minimum value on integer overflow (bug #47759)
Mike Miller <mtmiller@octave.org>
parents: 21686
diff changeset
325 %!assert (sscanf ('7777777777777777777777', '%lo'), double (intmax ("uint64")))
4418e579cca6 scanf: return maximum/minimum value on integer overflow (bug #47759)
Mike Miller <mtmiller@octave.org>
parents: 21686
diff changeset
326 %!assert (sscanf ('ffffffffffffffffffffff', '%lx'), double (intmax ("uint64")))
4418e579cca6 scanf: return maximum/minimum value on integer overflow (bug #47759)
Mike Miller <mtmiller@octave.org>
parents: 21686
diff changeset
327
23965
6f0c2963674b allow large ints to be read by C-style scanf (bug #51794)
John W. Eaton <jwe@octave.org>
parents: 23220
diff changeset
328 ## bug 51794
6f0c2963674b allow large ints to be read by C-style scanf (bug #51794)
John W. Eaton <jwe@octave.org>
parents: 23220
diff changeset
329 %!assert (sscanf ('2147483647', '%d', 'C'), 2147483647)
6f0c2963674b allow large ints to be read by C-style scanf (bug #51794)
John W. Eaton <jwe@octave.org>
parents: 23220
diff changeset
330 %!assert (sscanf ('2147483647', '%i', 'C'), 2147483647)
6f0c2963674b allow large ints to be read by C-style scanf (bug #51794)
John W. Eaton <jwe@octave.org>
parents: 23220
diff changeset
331 %!assert (sscanf ('4294967295', '%u', 'C'), 4294967295)
6f0c2963674b allow large ints to be read by C-style scanf (bug #51794)
John W. Eaton <jwe@octave.org>
parents: 23220
diff changeset
332 %!assert (sscanf ('37777777777', '%o', 'C'), 4294967295)
6f0c2963674b allow large ints to be read by C-style scanf (bug #51794)
John W. Eaton <jwe@octave.org>
parents: 23220
diff changeset
333 %!assert (sscanf ('ffffffff', '%x', 'C'), 4294967295)
6f0c2963674b allow large ints to be read by C-style scanf (bug #51794)
John W. Eaton <jwe@octave.org>
parents: 23220
diff changeset
334 ## FIXME: scanf should return int64/uint64 if all conversions are %l[dioux].
6f0c2963674b allow large ints to be read by C-style scanf (bug #51794)
John W. Eaton <jwe@octave.org>
parents: 23220
diff changeset
335 ## Until then only test values that are within precision range of a double.
6f0c2963674b allow large ints to be read by C-style scanf (bug #51794)
John W. Eaton <jwe@octave.org>
parents: 23220
diff changeset
336 %!assert (sscanf ('281474976710655', '%ld', 'C'), 281474976710655)
6f0c2963674b allow large ints to be read by C-style scanf (bug #51794)
John W. Eaton <jwe@octave.org>
parents: 23220
diff changeset
337 %!assert (sscanf ('281474976710655', '%li', 'C'), 281474976710655)
6f0c2963674b allow large ints to be read by C-style scanf (bug #51794)
John W. Eaton <jwe@octave.org>
parents: 23220
diff changeset
338 %!assert (sscanf ('281474976710655', '%lu', 'C'), 281474976710655)
6f0c2963674b allow large ints to be read by C-style scanf (bug #51794)
John W. Eaton <jwe@octave.org>
parents: 23220
diff changeset
339 %!assert (sscanf ('7777777777777777', '%lo', 'C'), 281474976710655)
6f0c2963674b allow large ints to be read by C-style scanf (bug #51794)
John W. Eaton <jwe@octave.org>
parents: 23220
diff changeset
340 %!assert (sscanf ('ffffffffffff', '%lx', 'C'), 281474976710655)
6f0c2963674b allow large ints to be read by C-style scanf (bug #51794)
John W. Eaton <jwe@octave.org>
parents: 23220
diff changeset
341
24477
e8cb11de9383 test: Mark certain bugs as xtest when run on Mac platforms (bug #52627).
Rik <rik@octave.org>
parents: 24461
diff changeset
342 %!testif ; ! ismac ()
e8cb11de9383 test: Mark certain bugs as xtest when run on Mac platforms (bug #52627).
Rik <rik@octave.org>
parents: 24461
diff changeset
343 %! [val, count, msg, pos] = sscanf ("3I2", "%f");
e8cb11de9383 test: Mark certain bugs as xtest when run on Mac platforms (bug #52627).
Rik <rik@octave.org>
parents: 24461
diff changeset
344 %! assert (val, 3);
e8cb11de9383 test: Mark certain bugs as xtest when run on Mac platforms (bug #52627).
Rik <rik@octave.org>
parents: 24461
diff changeset
345 %! assert (count, 1);
27137
30f53f7a7293 Return correct error messages on octave-streams when scanf fails (bug #56396)
Rik <rik@octave.org>
parents: 26865
diff changeset
346 %! assert (msg, "sscanf: format failed to match");
24477
e8cb11de9383 test: Mark certain bugs as xtest when run on Mac platforms (bug #52627).
Rik <rik@octave.org>
parents: 24461
diff changeset
347 %! assert (pos, 2);
e8cb11de9383 test: Mark certain bugs as xtest when run on Mac platforms (bug #52627).
Rik <rik@octave.org>
parents: 24461
diff changeset
348
e8cb11de9383 test: Mark certain bugs as xtest when run on Mac platforms (bug #52627).
Rik <rik@octave.org>
parents: 24461
diff changeset
349 %!xtest <47413>
e8cb11de9383 test: Mark certain bugs as xtest when run on Mac platforms (bug #52627).
Rik <rik@octave.org>
parents: 24461
diff changeset
350 %! ## Same test code as above, but intended only for test statistics on Mac.
e8cb11de9383 test: Mark certain bugs as xtest when run on Mac platforms (bug #52627).
Rik <rik@octave.org>
parents: 24461
diff changeset
351 %! if (! ismac ()), return; endif
13009
38b52a073cfa maint: fix botched tests in test_io.m
John W. Eaton <jwe@octave.org>
parents: 12995
diff changeset
352 %! [val, count, msg, pos] = sscanf ("3I2", "%f");
12995
7872afb42fab fix scanf problem with reading I (bug #33722)
John W. Eaton <jwe@octave.org>
parents: 12984
diff changeset
353 %! assert (val, 3);
7872afb42fab fix scanf problem with reading I (bug #33722)
John W. Eaton <jwe@octave.org>
parents: 12984
diff changeset
354 %! assert (count, 1);
27137
30f53f7a7293 Return correct error messages on octave-streams when scanf fails (bug #56396)
Rik <rik@octave.org>
parents: 26865
diff changeset
355 %! assert (msg, "sscanf: format failed to match");
12995
7872afb42fab fix scanf problem with reading I (bug #33722)
John W. Eaton <jwe@octave.org>
parents: 12984
diff changeset
356 %! assert (pos, 2);
7872afb42fab fix scanf problem with reading I (bug #33722)
John W. Eaton <jwe@octave.org>
parents: 12984
diff changeset
357
24477
e8cb11de9383 test: Mark certain bugs as xtest when run on Mac platforms (bug #52627).
Rik <rik@octave.org>
parents: 24461
diff changeset
358 %!testif ; ! ismac ()
13009
38b52a073cfa maint: fix botched tests in test_io.m
John W. Eaton <jwe@octave.org>
parents: 12995
diff changeset
359 %! [val, count, msg, pos] = sscanf ("3In2", "%f");
12995
7872afb42fab fix scanf problem with reading I (bug #33722)
John W. Eaton <jwe@octave.org>
parents: 12984
diff changeset
360 %! assert (val, 3);
7872afb42fab fix scanf problem with reading I (bug #33722)
John W. Eaton <jwe@octave.org>
parents: 12984
diff changeset
361 %! assert (count, 1);
27137
30f53f7a7293 Return correct error messages on octave-streams when scanf fails (bug #56396)
Rik <rik@octave.org>
parents: 26865
diff changeset
362 %! assert (msg, "sscanf: format failed to match");
12995
7872afb42fab fix scanf problem with reading I (bug #33722)
John W. Eaton <jwe@octave.org>
parents: 12984
diff changeset
363 %! assert (pos, 2);
7872afb42fab fix scanf problem with reading I (bug #33722)
John W. Eaton <jwe@octave.org>
parents: 12984
diff changeset
364
24477
e8cb11de9383 test: Mark certain bugs as xtest when run on Mac platforms (bug #52627).
Rik <rik@octave.org>
parents: 24461
diff changeset
365 %!xtest <47413>
e8cb11de9383 test: Mark certain bugs as xtest when run on Mac platforms (bug #52627).
Rik <rik@octave.org>
parents: 24461
diff changeset
366 %! ## Same test code as above, but intended only for test statistics on Mac.
e8cb11de9383 test: Mark certain bugs as xtest when run on Mac platforms (bug #52627).
Rik <rik@octave.org>
parents: 24461
diff changeset
367 %! if (! ismac ()), return; endif
e8cb11de9383 test: Mark certain bugs as xtest when run on Mac platforms (bug #52627).
Rik <rik@octave.org>
parents: 24461
diff changeset
368 %! [val, count, msg, pos] = sscanf ("3In2", "%f");
e8cb11de9383 test: Mark certain bugs as xtest when run on Mac platforms (bug #52627).
Rik <rik@octave.org>
parents: 24461
diff changeset
369 %! assert (val, 3);
e8cb11de9383 test: Mark certain bugs as xtest when run on Mac platforms (bug #52627).
Rik <rik@octave.org>
parents: 24461
diff changeset
370 %! assert (count, 1);
e8cb11de9383 test: Mark certain bugs as xtest when run on Mac platforms (bug #52627).
Rik <rik@octave.org>
parents: 24461
diff changeset
371 %! assert (msg, "");
e8cb11de9383 test: Mark certain bugs as xtest when run on Mac platforms (bug #52627).
Rik <rik@octave.org>
parents: 24461
diff changeset
372 %! assert (pos, 2);
e8cb11de9383 test: Mark certain bugs as xtest when run on Mac platforms (bug #52627).
Rik <rik@octave.org>
parents: 24461
diff changeset
373
e8cb11de9383 test: Mark certain bugs as xtest when run on Mac platforms (bug #52627).
Rik <rik@octave.org>
parents: 24461
diff changeset
374 %!testif ; ! ismac ()
e8cb11de9383 test: Mark certain bugs as xtest when run on Mac platforms (bug #52627).
Rik <rik@octave.org>
parents: 24461
diff changeset
375 %! [val, count, msg, pos] = sscanf ("3Inf2", "%f");
e8cb11de9383 test: Mark certain bugs as xtest when run on Mac platforms (bug #52627).
Rik <rik@octave.org>
parents: 24461
diff changeset
376 %! assert (val, [3; Inf; 2]);
e8cb11de9383 test: Mark certain bugs as xtest when run on Mac platforms (bug #52627).
Rik <rik@octave.org>
parents: 24461
diff changeset
377 %! assert (count, 3);
e8cb11de9383 test: Mark certain bugs as xtest when run on Mac platforms (bug #52627).
Rik <rik@octave.org>
parents: 24461
diff changeset
378 %! assert (msg, "");
e8cb11de9383 test: Mark certain bugs as xtest when run on Mac platforms (bug #52627).
Rik <rik@octave.org>
parents: 24461
diff changeset
379 %! assert (pos, 6);
e8cb11de9383 test: Mark certain bugs as xtest when run on Mac platforms (bug #52627).
Rik <rik@octave.org>
parents: 24461
diff changeset
380
e8cb11de9383 test: Mark certain bugs as xtest when run on Mac platforms (bug #52627).
Rik <rik@octave.org>
parents: 24461
diff changeset
381 %!xtest <47413>
e8cb11de9383 test: Mark certain bugs as xtest when run on Mac platforms (bug #52627).
Rik <rik@octave.org>
parents: 24461
diff changeset
382 %! ## Same test code as above, but intended only for test statistics on Mac.
e8cb11de9383 test: Mark certain bugs as xtest when run on Mac platforms (bug #52627).
Rik <rik@octave.org>
parents: 24461
diff changeset
383 %! if (! ismac ()), return; endif
13009
38b52a073cfa maint: fix botched tests in test_io.m
John W. Eaton <jwe@octave.org>
parents: 12995
diff changeset
384 %! [val, count, msg, pos] = sscanf ("3Inf2", "%f");
38b52a073cfa maint: fix botched tests in test_io.m
John W. Eaton <jwe@octave.org>
parents: 12995
diff changeset
385 %! assert (val, [3; Inf; 2]);
12995
7872afb42fab fix scanf problem with reading I (bug #33722)
John W. Eaton <jwe@octave.org>
parents: 12984
diff changeset
386 %! assert (count, 3);
7872afb42fab fix scanf problem with reading I (bug #33722)
John W. Eaton <jwe@octave.org>
parents: 12984
diff changeset
387 %! assert (msg, "");
7872afb42fab fix scanf problem with reading I (bug #33722)
John W. Eaton <jwe@octave.org>
parents: 12984
diff changeset
388 %! assert (pos, 6);
7872afb42fab fix scanf problem with reading I (bug #33722)
John W. Eaton <jwe@octave.org>
parents: 12984
diff changeset
389
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
390 %!test
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
391 %! [a, b, c] = sscanf ("1.2 3 foo", "%f%d%s", "C");
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
392 %! [v1, c1, m1] = sscanf ("1 2 3 4 5 6", "%d");
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
393 %! [v2, c2, m2] = sscanf ("1 2 bar 3 4 5 6", "%d");
16215
6fe6ac8bbfdb test: Remove trailing spaces from ends of lines in test/ directory.
Rik <rik@octave.org>
parents: 16213
diff changeset
394 %!
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
395 %! assert ((a == 1.2 && b == 3 && c == "foo"
21580
ecce63c99c3f maint: Add semicolons to terminate code in %! blocks.
Rik <rik@octave.org>
parents: 21568
diff changeset
396 %! && v1 == [1; 2; 3; 4; 5; 6] && c1 == 6 && ischar (m1)
ecce63c99c3f maint: Add semicolons to terminate code in %! blocks.
Rik <rik@octave.org>
parents: 21568
diff changeset
397 %! && v2 == [1; 2] && c2 == 2 && ischar (m2)));
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
398
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
399 %!error <Invalid call to sscanf> sscanf ()
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
400 %!error sscanf (1, 2)
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
401 %!error <Invalid call to sscanf> sscanf ("foo", "bar", "C", 1)
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
402
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
403 %!test
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
404 %! [x, n] = sscanf (" 0.024000 0.200 0.200 2.000 1987 5 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 2 0 0 1 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 4 5 1 2 2 5 5 8 2 8 12 6 15 18 28 26 47 88 118 162 192 130 88 56 27 23 14 9 6 3 4 1 0 2 3 1 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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 1 1 1 2 0 0 0 0 1 0 2 2 2 1 0 0 3 3 0 2 0 6 2 3 1 0 3 3 1 2 2 5 3 5 3 3 2 2 7 3 2 2 3 4 2 3 4 4 1 3 7 4 5 4 2 3 5 4 2 1 3 6 3 4 3 8 7 6 5 3 5 11 5 5 3 3 7 3 6 4 4 2 4 4 4 1 5 5 9 6 6 9 3 10 8 6 8 3 10 8 16 16 13 18 23 29 25 19 19 20 27 19 22 27 24 21 15 18 11 20 21 17 12 5 18 6 12 7 9 11 7 12 11 4 8 8 4 8 7 7 2 6 4 4 9 6 9 3 4 7 7 7 4 10 4 11 5 8 8 8 5 4 4 8 6 4 9 8 12 12 8 5 8 3 10 8 7 5 3 5 6 8 5 6 10 7 2 11 2 5 5 6 8 10 2 7 5 5 14 2 7 3 9 3 5 2 8 2 3 4 4 7 9 5 4 7 6 7 5 6 3 5 4 7 6 7 7 9 3 0 2 1 1 1 0 0 0.142000 3.150 3.150 7.900 1429499 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 3 1 2 1 1 0 0 0 3 0 2 2 1 0 3 0 2 1 3 0 0 1 1 3 1 2 4 1 5 3 5 1 0 7 1 3 2 3 2 2 2 3 0 0 1 3 6 3 2 2 4 4 4 6 4 3 6 4 10 3 7 2 5 4 7 4 5 8 4 7 4 1 7 11 5 2 10 2 11 3 7 8 10 9 6 3 5 3 6 3 10 11 5 5 9 7 10 8 9 5 15 11 9 18 18 15 24 17 23 17 19 25 17 24 18 37 16 17 21 17 14 20 17 15 15 9 4 11 7 3 8 10 8 8 6 8 3 4 5 8 4 6 3 9 9 6 2 10 4 4 3 8 4 9 1 7 5 9 7 10 9 10 4 6 5 8 6 6 10 10 6 5 7 6 6 10 5 7 8 8 8 7 7 11 12 8 3 10 6 9 13 11 4 6 7 6 3 10 5 8 4 7 7 7 5 8 4 9 5 5 7 6 6 7 11 11 7 8 5 3 5 7 7 10 3 3 6 5 7 9 2 3 7 1 0 0 0 0 1 0.144000 3.200 3.200 8.000 1493946 3 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 2 3 0 0 1 2 1 1 1 4 1 0 1 0 1 2 1 3 1 1 1 1 2 1 1 3 2 6 0 4 0 1 4 2 4 5 2 1 3 0 2 2 4 2 3 2 4 3 5 4 4 4 1 5 1 3 4 5 6 4 7 2 8 8 8 5 3 6 0 7 3 2 2 5 7 5 7 5 8 9 6 4 3 6 8 6 10 2 5 6 3 3 6 6 6 6 17 5 10 6 6 11 11 13 12 21 26 18 24 21 24 23 30 18 22 20 24 19 13 17 25 22 17 15 8 13 7 10 8 9 6 7 9 8 7 8 9 7 7 6 12 5 9 9 12 9 12 6 9 7 10 7 7 4 9 7 4 2 7 4 5 8 8 9 7 6 7 5 9 4 8 13 6 5 4 7 9 6 7 7 9 4 4 5 8 10 9 10 6 6 7 9 12 11 8 8 9 11 5 8 7 5 5 8 5 9 10 5 5 11 11 6 8 8 4 8 5 5 5 4 7 4 5 6 5 6 6 7 7 4 2 6 3 2 1 0 0 0 0 0 0.146000 3.250 3.250 8.100 1562352 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 2 0 2 0 1 2 1 1 0 0 1 0 1 2 0 0 0 3 1 2 0 4 4 2 0 0 2 3 2 0 1 3 3 4 0 1 4 3 3 4 5 5 4 2 1 4 2 5 3 2 7 6 3 5 6 5 5 5 1 5 2 7 4 8 7 4 6 5 7 5 3 5 8 1 6 4 6 8 7 6 7 6 3 4 6 3 5 8 4 10 3 3 11 6 5 3 9 6 4 3 17 9 11 11 24 13 15 14 25 26 26 21 17 32 32 22 18 25 29 29 27 24 21 12 23 14 12 11 9 17 7 9 11 3 7 6 5 5 12 3 6 8 7 4 7 11 10 8 9 5 8 2 10 9 8 10 10 7 7 4 7 5 7 7 9 10 8 7 7 16 6 8 10 5 6 6 12 12 7 11 11 8 9 7 8 12 10 7 8 7 11 8 9 7 7 4 9 4 7 14 9 8 8 13 9 8 7 13 5 9 5 7 4 9 5 7 8 7 8 7 3 10 9 3 4 4 4 5 2 6 6 3 5 10 4 4 2 3 0 1 0 0 0.148000 3.300 3.300 8.200 1630559 3 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 4 2 1 1 1 2 1 2 0 2 1 5 0 1 1 4 0 2 1 4 5 3 0 1 1 1 2 1 3 3 3 1 1 1 1 1 3 4 6 6 8 8 4 3 2 7 2 2 1 7 4 4 5 1 10 6 4 4 4 3 3 3 6 11 6 4 5 4 8 5 5 9 4 5 5 7 6 4 13 12 3 6 7 5 2 7 9 7 8 8 4 7 6 4 10 6 8 9 9 9 13 15 17 23 25 13 16 24 22 26 21 27 24 24 21 21 21 15 17 22 25 21 22 17 14 11 8 12 5 9 7 8 5 11 10 6 6 5 9 13 10 9 8 8 8 6 4 9 10 9 9 7 8 7 5 7 8 14 13 5 14 5 12 11 8 9 6 5 4 9 13 7 10 13 11 11 8 5 9 10 8 7 6 7 13 3 13 8 7 13 17 5 8 5 10 7 12 7 6 6 9 7 8 8 11 8 11 9 11 11 8 5 6 10 4 9 3 10 8 7 10 8 7 8 10 10 7 4 11 5 7 8 2 4 3 0 0 1 0 1 0.150000 3.350 3.350 8.300 1707576 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 2 1 2 1 0 2 0 2 3 1 3 2 2 2 2 0 2 1 4 3 2 2 3 1 2 1 0 2 2 4 2 5 3 3 5 2 8 4 5 4 2 3 6 7 6 1 0 7 4 7 7 6 5 4 3 4 6 6 7 6 2 7 4 4 2 5 5 6 9 3 3 3 6 6 5 3 5 7 8 8 6 8 8 6 8 3 9 6 6 8 8 6 4 8 6 6 10 4 11 6 11 15 23 16 8 17 20 21 19 24 15 14 19 21 30 25 21 15 19 16 18 21 21 15 14 12 16 8 10 12 7 10 9 8 10 10 7 9 8 10 12 6 6 9 11 6 5 9 12 6 7 12 7 5 6 8 5 9 4 11 9 8 8 10 7 6 10 7 11 13 7 4 13 11 8 11 9 16 6 12 11 10 10 19 2 9 11 8 7 8 8 6 13 6 10 12 12 9 12 9 9 8 7 7 9 6 12 8 4 9 9 8 5 7 8 9 5 12 5 7 5 9 10 9 10 3 6 6 8 7 11 3 5 5 4 2 0 0 0 0 0.152000 3.400 3.400 8.400 1777231 3 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 1 1 0 0 1 1 3 1 0 3 4 2 3 3 3 3 3 2 1 1 1 1 3 3 0 1 8 0 0 5 3 7 4 4 4 4 4 3 5 2 2 5 3 6 1 7 6 1 2 2 5 2 1 6 6 8 7 7 5 10 4 1 6 9 3 4 5 3 5 8 4 9 8 11 8 3 2 7 7 9 10 9 10 8 6 8 6 8 7 10 8 7 3 8 4 10 7 6 8 9 6 5 16 9 19 24 23 17 23 24 22 30 21 15 23 27 20 20 20 18 20 23 18 17 15 19 17 18 13 9 4 4 7 12 7 10 4 8 6 10 5 6 13 2 3 8 7 8 7 3 11 8 7 9 7 19 7 8 9 6 14 8 8 11 10 11 13 14 10 16 8 9 13 8 9 9 12 7 12 11 6 9 15 5 9 9 9 11 11 13 6 10 6 4 12 9 9 12 11 8 6 9 16 10 10 10 8 10 10 6 7 4 1 15 6 8 4 9 13 11 8 10 11 9 8 3 3 6 6 7 9 4 6 8 7 4 2 1 2 2 1 0 0.154000 3.450 3.450 8.500 1849489 6 0 0 0 0 0 0 0 0 0 0 0 1 1 3 0 1 2 2 0 1 4 1 1 0 1 0 2 1 0 0 1 1 1 1 6 3 6 1 3 1 3 3 0 6 0 4 2 7 4 6 4 4 3 7 4 5 7 5 5 2 3 9 9 2 5 5 3 9 4 2 7 6 2 8 2 5 7 12 6 5 4 5 10 4 12 10 6 4 14 7 9 10 11 7 7 7 7 3 9 7 4 3 8 7 5 7 9 6 8 9 6 8 8 12 6 5 11 12 13 11 13 21 26 19 23 25 18 23 22 23 23 18 27 20 15 20 25 24 19 18 12 14 13 15 8 15 10 11 7 9 13 11 12 13 11 11 7 11 13 6 5 10 6 6 10 8 14 5 14 11 8 5 9 7 10 10 8 7 15 13 3 13 12 18 15 7 10 9 10 8 15 9 6 8 9 10 10 9 5 7 7 5 10 11 13 12 12 12 10 6 17 10 11 9 4 8 7 6 6 9 12 8 16 18 7 5 10 8 12 10 15 6 13 11 6 10 16 10 11 16 8 9 5 11 10 14 11 5 2 5 7 3 1 1 0 1 0 0.156000 3.500 3.500 8.600 1920727 4 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 2 1 2 0 3 0 1 1 0 1 0 3 0 4 4 1 3 1 2 3 3 4 3 1 2 3 9 5 2 3 7 3 3 6 5 2 6 1 4 3 2 3 6 5 1 8 3 8 5 3 7 6 13 11 9 5 8 7 7 5 8 7 4 8 6 4 10 4 6 5 6 9 9 12 6 7 10 9 9 8 8 3 8 9 8 8 2 12 11 13 8 13 7 8 6 6 9 6 8 16 13 14 16 16 22 20 21 21 17 20 18 19 22 20 11 20 22 21 14 19 15 23 17 15 12 14 19 16 10 11 14 11 9 11 9 12 8 16 14 9 6 18 10 11 7 10 11 17 10 13 8 10 12 9 12 7 7 10 10 11 11 9 8 8 14 10 10 9 14 9 14 13 9 19 16 17 4 11 8 12 11 10 21 6 10 8 9 12 9 7 7 12 7 16 14 10 13 6 13 8 9 10 6 10 8 7 10 4 6 11 19 12 6 7 5 8 11 10 12 13 9 6 10 5 11 11 4 14 10 7 2 6 5 1 2 5 1 1 0 0 0.158000 3.550 3.550 8.700 1999833 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 2 2 3 2 2 2 1 2 3 0 1 0 1 3 2 0 0 3 2 3 2 5 7 0 3 4 1 10 7 7 4 5 2 3 4 3 8 3 6 4 4 4 8 2 3 4 5 5 7 1 6 7 8 1 6 8 1 4 4 11 9 4 7 11 9 10 5 6 8 4 3 9 7 9 11 5 5 8 8 4 8 7 8 11 9 12 6 4 13 4 12 10 6 9 11 10 11 10 11 11 11 14 15 14 23 18 17 29 16 26 23 15 19 14 18 19 22 31 13 21 20 12 16 15 14 18 17 15 8 12 14 13 10 10 10 10 10 13 11 6 8 11 8 14 8 10 11 11 8 10 13 5 14 7 12 9 10 10 12 15 18 8 6 9 9 12 8 9 20 14 16 10 11 14 5 5 13 6 11 9 11 15 6 9 13 11 7 8 7 10 8 16 12 11 8 10 14 11 17 11 8 16 13 9 10 5 10 17 13 14 16 8 10 9 11 5 10 9 10 12 8 11 12 11 8 6 7 12 15 13 12 7 13 5 0 3 2 0 0 0 0 0.160000 3.600 3.600 8.800 2073149 3 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 2 1 2 1 2 2 1 0 2 2 1 0 3 6 4 5 5 2 2 2 5 5 3 6 4 6 4 5 2 4 4 3 2 4 6 3 3 6 5 7 4 5 7 5 3 5 6 13 5 3 10 5 9 7 4 5 6 5 10 6 5 5 6 6 4 14 7 6 11 6 9 10 9 8 5 3 8 10 10 6 6 8 9 5 6 14 7 11 10 9 9 11 13 8 4 5 10 12 6 16 8 8 7 19 20 23 10 16 27 25 23 19 26 21 16 20 21 24 18 25 8 11 13 16 18 13 22 18 9 16 4 16 10 12 13 9 7 9 8 17 11 10 13 10 14 4 9 12 16 8 9 16 17 13 11 14 8 8 13 9 11 15 10 11 14 8 6 4 9 11 18 9 9 8 9 15 11 11 11 9 6 13 13 10 7 8 10 15 14 9 7 4 10 12 17 10 14 13 10 10 12 20 9 7 6 11 15 11 10 8 9 6 10 13 17 6 8 9 6 13 13 16 10 15 5 11 14 11 12 6 5 12 9 4 9 2 4 1 1 0 0 0 0.162000 3.650 3.650 8.900 2156456 5 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 2 0 1 1 3 2 3 4 3 3 2 1 3 6 5 2 3 4 4 3 6 2 3 4 4 5 5 3 4 1 4 5 9 3 3 4 3 3 8 5 6 12 2 10 3 4 6 8 9 8 8 2 2 7 5 8 2 8 9 7 2 6 8 6 5 8 2 7 5 6 13 5 6 8 11 6 10 5 6 3 8 10 11 10 10 14 10 11 8 11 8 12 6 12 5 15 12 13 10 13 13 18 23 12 21 18 21 23 20 30 20 23 26 24 24 21 21 29 19 21 16 23 20 13 19 13 16 11 15 13 13 11 8 11 14 14 13 4 16 15 18 13 9 19 8 11 6 9 14 8 13 12 13 10 13 10 14 11 13 11 8 10 13 11 11 14 11 8 14 11 10 9 14 12 14 18 8 12 7 13 12 10 14 14 8 12 17 11 13 9 12 12 15 7 9 13 17 11 11 11 12 17 12 11 16 15 8 9 12 7 13 15 11 16 7 10 7 14 5 18 10 10 8 8 6 6 13 14 6 9 11 9 9 3 5 1 1 3 0 0 0.164000 3.700 3.700 9.000 2234753 3 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 4 1 4 2 1 3 1 1 3 2 3 3 1 3 6 2 4 4 3 3 3 6 5 2 6 4 1 3 3 7 1 4 4 6 12 4 5 2 6 4 9 3 1 8 11 5 2 7 6 3 8 4 7 3 8 3 9 6 7 8 9 2 7 6 9 6 15 6 9 5 9 4 9 17 15 10 2 10 6 8 12 12 11 12 10 9 7 11 8 7 5 11 10 14 16 7 7 7 13 15 10 16 17 21 19 14 18 24 19 27 27 24 20 22 24 21 20 14 24 17 17 18 32 15 12 13 15 12 8 14 11 11 19 11 14 15 18 10 5 12 11 11 9 15 9 7 9 16 12 9 12 10 15 9 18 7 11 12 14 7 20 8 10 13 14 11 6 6 9 11 8 10 16 8 17 13 17 9 16 11 10 9 13 20 17 14 12 10 13 11 9 9 17 20 10 16 8 14 13 14 18 15 15 8 10 12 11 22 12 13 9 12 9 11 14 19 12 12 8 8 12 11 19 11 11 12 15 11 15 13 9 9 10 9 4 9 4 2 1 0 0 0.166000 3.750 3.750 9.100 2327990 3 0 0 0 0 0 0 0 0 0 0 0 0 0 3 2 2 0 1 2 2 1 1 0 0 3 1 4 2 6 4 2 4 3 2 5 5 2 3 1 3 1 2 10 2 7 4 3 4 3 3 4 3 10 6 9 6 3 8 5 5 3 4 4 6 8 4 4 7 5 5 11 14 5 3 6 8 8 7 10 11 7 17 7 11 10 8 7 8 12 13 11 12 6 13 9 7 7 6 5 8 13 10 10 14 11 11 8 12 15 14 9 13 10 9 18 13 18 12 23 14 17 24 15 23 25 31 19 17 29 19 19 19 26 25 19 17 22 19 19 19 11 11 12 22 21 8 10 18 10 14 19 17 13 14 10 6 9 10 15 11 5 13 13 11 11 17 16 9 7 14 7 19 6 10 13 7 12 18 14 7 12 15 13 13 9 13 13 13 12 12 14 12 19 10 16 18 18 12 8 10 10 9 7 14 9 11 13 12 8 15 12 11 10 12 11 17 15 19 14 14 12 7 7 12 11 15 16 12 11 12 10 19 19 12 14 12 15 11 20 13 7 18 9 15 19 16 11 5 9 8 6 2 4 0 2 0 1 0.168000 3.800 3.800 9.200 2406866 3 0 0 0 0 0 0 0 0 0 0 1 0 2 0 1 0 2 3 2 3 1 2 1 2 2 5 2 1 2 3 2 2 2 5 3 5 3 3 1 3 6 8 6 1 3 9 6 3 6 10 5 5 7 4 5 7 12 9 5 7 5 6 6 8 3 5 4 7 8 5 6 5 8 13 4 10 2 10 9 7 7 16 9 10 9 13 8 12 9 13 15 9 15 9 10 11 6 6 6 7 7 6 8 15 9 8 9 6 12 12 11 14 12 11 13 8 17 18 18 11 14 19 14 25 21 15 10 15 19 27 23 22 24 17 19 18 12 16 22 21 25 9 25 15 19 15 21 15 8 11 13 12 10 12 7 13 11 17 11 13 10 16 19 14 23 11 8 12 13 10 9 17 4 14 10 7 10 17 14 11 11 20 18 13 8 12 6 8 13 12 23 15 14 15 16 9 14 9 13 14 17 11 17 11 10 15 17 11 6 12 12 14 15 17 12 16 16 8 17 15 15 10 15 11 10 15 12 13 9 12 9 12 15 12 6 18 7 15 14 12 21 18 11 10 18 11 19 11 7 11 3 2 5 4 0 1 1 0.170000 3.850 3.850 9.300 2508471 7 0 0 0 0 0 0 0 0 0 0 0 0 0 1 3 1 2 1 4 3 3 1 2 7 0 3 2 2 2 2 5 2 3 2 3 3 4 3 7 3 5 3 4 4 6 2 3 10 4 11 3 13 7 7 5 6 3 8 10 6 6 4 10 11 4 12 7 8 9 7 7 8 4 6 7 9 9 5 9 11 5 14 9 10 7 9 8 8 5 6 11 13 14 10 10 10 10 8 9 9 9 9 14 14 13 11 8 18 9 10 9 16 12 13 15 13 10 17 16 20 14 22 20 26 29 29 27 24 20 37 21 24 13 18 13 28 24 22 25 21 13 14 15 9 11 18 8 16 17 16 13 12 16 11 11 17 15 11 15 10 11 12 13 12 12 20 15 14 15 16 12 17 15 15 12 10 14 14 17 15 19 15 13 13 11 12 16 14 17 16 8 16 12 8 14 13 13 10 10 9 12 11 19 20 13 11 4 15 11 14 11 20 18 18 13 20 12 20 21 15 15 12 13 18 18 11 16 9 14 9 18 11 10 11 20 11 13 17 13 13 12 14 16 10 12 12 23 12 11 12 8 8 1 0 1 2 0 0.172000 3.900 3.900 9.400 2591210 3 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 4 4 3 2 1 3 3 2 3 0 3 6 1 3 1 5 5 4 3 9 9 0 4 7 5 3 5 5 8 7 3 3 5 5 8 5 11 10 8 10 3 6 6 6 7 7 8 8 12 9 6 10 8 7 10 8 8 10 4 6 12 20 4 6 11 7 9 10 7 5 10 6 12 11 7 13 13 16 12 6 8 14 13 9 7 5 14 17 17 10 12 11 6 13 11 17 3 23 13 21 12 21 28 11 23 30 28 23 24 26 26 17 21 15 27 23 33 16 22 25 11 20 22 23 21 20 7 21 13 16 12 16 16 13 18 18 9 13 16 15 9 20 13 19 15 8 9 11 14 13 10 9 10 16 15 14 17 15 19 16 12 14 12 14 14 16 19 19 4 24 8 12 15 16 11 15 14 20 14 13 13 14 16 19 14 13 19 14 18 23 15 15 4 14 17 14 8 10 15 20 11 15 19 12 9 13 12 11 16 12 16 13 14 16 13 16 16 19 19 12 11 10 19 15 15 14 12 5 11 18 17 10 13 12 9 6 2 0 0 1 0 0.174000 3.950 3.950 9.500 2675515 3 0 0 0 0 0 0 0 0 0 0 0 2 0 1 1 0 2 1 2 3 3 1 3 1 3 7 5 3 6 4 3 9 4 5 2 5 3 3 3 6 9 5 5 2 6 8 5 8 4 8 5 6 5 6 4 6 3 7 11 6 9 9 3 6 6 7 6 8 7 9 12 18 6 9 8 11 11 8 14 15 15 11 15 13 9 19 10 15 14 9 4 18 5 8 10 8 10 13 9 12 11 8 8 12 6 15 8 9 9 18 7 17 21 9 13 18 14 21 24 18 22 17 26 15 21 23 25 19 26 23 20 27 17 27 20 26 15 22 15 19 15 16 24 12 15 24 13 13 17 11 7 10 21 15 15 16 13 20 22 12 16 12 16 15 14 18 11 12 14 14 24 10 13 16 19 8 11 18 19 15 15 23 16 16 11 12 18 11 13 14 16 10 14 13 18 12 15 15 14 8 11 17 12 22 13 12 14 15 10 11 15 19 15 12 17 8 21 23 13 19 11 8 12 15 11 14 15 19 15 10 17 9 16 14 18 14 16 14 14 23 14 14 13 16 12 14 15 14 9 14 7 5 2 3 1 1 1 0.176000 4.000 4.000 9.600 2779386 5 0 0 0 0 0 0 0 0 0 0 0 0 2 2 3 0 1 3 0 6 2 6 3 1 5 0 4 1 6 5 1 6 3 6 5 6 2 5 4 5 3 9 8 5 7 5 8 4 12 8 12 6 8 5 7 5 7 10 5 5 6 7 9 7 10 7 10 10 8 12 10 6 13 10 11 12 11 10 10 16 9 6 12 9 11 17 10 11 10 14 11 16 7 11 13 12 10 17 14 11 13 12 10 13 16 16 17 17 15 14 11 8 15 13 27 22 14 19 17 22 22 27 18 28 19 27 32 24 33 21 17 23 12 27 25 20 20 17 22 14 15 22 21 14 9 16 12 19 16 17 16 16 20 14 18 15 14 18 10 12 9 16 12 12 10 13 19 12 12 15 14 15 22 12 11 15 18 19 18 10 6 11 14 10 23 17 14 16 19 10 10 16 19 17 23 16 18 19 18 16 12 14 14 14 13 11 10 24 21 22 26 18 18 18 14 17 5 13 17 11 13 16 14 18 16 9 15 15 18 16 14 21 13 22 17 9 8 16 17 16 16 19 7 20 19 18 16 10 6 10 6 3 5 1 0 0 2 0.178000 4.050 4.050 9.700 2869617 3 0 0 0 0 0 0 0 0 0 0 0 2 2 2 0 1 4 1 3 2 2 1 2 3 2 2 4 4 7 5 6 5 3 6 6 5 7 8 1 5 2 3 5 5 8 10 7 6 10 9 6 8 9 7 8 10 15 4 10 5 8 8 6 11 8 8 11 7 5 8 14 5 11 7 13 10 9 7 8 9 14 12 10 9 11 6 14 15 14 13 11 9 18 18 10 14 14 10 12 16 12 9 8 14 15 6 11 11 12 10 14 12 11 18 13 13 27 16 23 23 20 21 32 20 18 25 22 24 32 25 34 19 23 21 25 22 25 19 23 19 21 16 19 16 18 9 18 6 13 12 13 18 12 8 19 14 14 11 16 13 15 14 21 11 14 14 13 11 20 14 14 26 10 22 16 18 15 20 24 18 19 19 16 14 14 14 21 13 19 18 20 13 17 11 17 14 22 17 15 15 20 8 21 15 16 16 23 17 13 19 21 20 12 15 18 15 19 15 18 17 20 15 13 14 24 18 15 15 14 18 20 19 17 19 20 21 21 15 19 19 17 11 16 16 11 23 10 20 13 10 5 10 2 3 1 1 0 0.180000 4.100 4.100 9.800 2975040 3 0 0 0 0 0 0 0 0 0 1 0 0 1 2 2 4 4 2 4 4 1 2 5 0 3 3 5 2 5 5 4 9 2 7 8 4 8 3 11 6 10 4 7 8 6 6 5 8 8 7 11 4 4 11 12 7 11 7 10 11 7 11 11 10 9 7 13 12 18 8 14 12 14 12 8 8 16 10 10 14 16 10 6 8 15 15 15 22 13 19 18 12 6 11 10 7 12 12 24 15 17 9 17 21 10 17 18 14 14 14 9 22 11 23 17 15 23 32 20 11 12 20 15 23 30 20 25 19 26 29 19 27 23 15 19 11 30 16 21 24 18 18 14 8 6 25 13 21 13 13 19 13 21 25 23 18 14 14 13 20 12 14 8 10 25 14 15 20 15 10 15 16 21 8 15 20 21 20 13 16 15 20 11 18 17 17 9 12 24 19 13 18 17 20 14 15 20 10 23 19 25 8 7 13 14 11 15 18 13 10 12 10 17 11 24 16 17 11 12 13 16 20 14 26 12 17 13 14 16 16 6 20 16 23 22 11 17 16 14 25 19 17 21 22 19 13 19 16 18 10 11 7 4 6 0 0 2 0.182000 4.150 4.150 9.900 3083416 6 0 0 0 0 0 0 0 0 0 0 0 2 1 1 4 1 3 4 3 5 6 2 1 4 2 3 5 6 6 7 2 4 1 11 7 5 2 6 6 8 9 8 12 7 11 9 6 12 7 8 9 6 6 8 11 6 6 8 11 8 11 12 11 13 9 10 7 9 6 11 9 13 12 12 8 14 15 8 9 8 8 11 22 16 6 11 16 15 9 13 12 12 13 11 15 9 9 16 14 14 12 21 12 12 12 16 19 10 15 18 8 16 14 16 16 21 30 22 9 25 19 19 26 23 33 25 22 21 19 21 20 20 21 20 26 20 29 27 25 25 21 20 25 21 21 18 14 19 15 6 20 18 16 20 16 13 13 15 15 15 15 22 16 15 15 11 21 19 11 19 13 14 15 17 21 12 18 12 22 18 21 18 13 23 15 18 9 21 11 14 23 18 21 25 18 22 15 21 23 15 15 16 19 21 18 19 21 17 13 24 23 22 19 14 20 22 15 14 14 20 20 23 13 18 15 18 20 20 24 9 12 17 21 21 12 16 17 16 16 21 26 19 15 21 22 24 15 11 13 13 6 8 1 4 0 1 0 0.184000 4.200 4.200 10.00 3174897 3 0 0 0 0 0 0 0 0 0 0 0 1 1 2 3 0 5 4 3 3 0 7 3 2 4 2 8 6 4 5 9 3 8 6 4 2 7 6 8 7 9 3 5 8 5 9 7 7 6 11 14 7 12 9 9 5 15 12 14 15 12 9 11 5 8 13 11 12 10 9 17 12 11 8 17 11 19 11 15 9 11 7 15 14 16 16 16 7 12 10 14 13 13 16 16 11 15 13 14 12 16 11 12 13 17 10 13 19 11 17 11 13 14 13 10 19 19 23 24 22 24 24 31 19 23 22 28 21 25 29 17 23 17 21 30 22 19 25 27 27 22 23 23 17 25 17 20 17 12 23 21 9 17 20 16 19 16 17 20 9 16 11 22 16 15 12 15 17 23 24 16 16 18 26 11 16 20 18 10 14 17 26 19 17 15 17 19 12 21 20 24 17 27 13 16 18 19 23 14 19 14 10 11 18 19 6 15 21 23 25 17 17 18 21 27 20 17 18 20 25 22 20 18 22 18 17 15 24 16 15 22 18 22 14 20 20 22 18 22 25 19 26 12 19 19 13 12 16 19 14 9 7 5 4 2 0 2 0.186000 4.250 4.250 10.10 3283256 3 0 0 0 0 0 0 0 0 1 0 0 1 1 4 1 5 2 5 5 3 4 6 3 2 4 7 8 2 6 6 4 10 7 8 7 5 4 4 9 8 18 10 7 6 6 13 12 10 13 10 7 15 4 7 10 13 12 8 8 13 5 14 6 9 14 9 10 16 12 13 11 8 12 11 10 13 9 11 15 17 23 18 13 10 12 11 12 14 14 14 10 12 12 16 13 15 13 13 14 18 10 13 17 14 14 14 12 12 8 18 14 23 20 16 19 16 16 16 27 18 21 19 20 19 37 22 21 22 28 24 26 18 21 28 21 22 21 21 22 16 15 13 22 22 27 22 11 13 20 10 17 16 19 20 30 18 25 8 7 22 18 17 14 23 16 17 11 16 24 19 18 22 15 15 23 16 13 15 22 14 8 12 18 13 15 22 17 15 15 17 27 21 19 21 24 17 10 12 14 19 17 22 18 19 17 28 19 15 14 16 28 17 20 15 11 22 18 19 16 21 17 24 19 22 22 20 10 20 18 18 18 21 18 23 18 32 26 21 21 22 20 22 16 17 20 22 21 17 13 13 11 9 5 0 1 1 1 0.188000 4.300 4.300 10.20 3396610 5 0 0 0 0 0 0 0 0 0 0 0 1 2 3 0 2 5 5 4 3 3 5 1 2 3 6 9 3 3 3 8 7 2 9 5 7 5 11 8 9 7 6 9 6 4 5 8 6 10 9 14 10 15 6 7 13 15 10 13 7 15 10 10 11 14 14 6 7 17 13 19 3 13 9 6 13 13 14 10 11 12 16 17 13 10 15 15 19 19 11 11 15 11 13 9 13 20 8 18 14 18 23 23 23 15 19 20 14 11 7 18 16 15 22 28 20 24 22 25 17 20 39 24 26 25 25 33 25 25 25 33 15 29 18 29 18 12 18 23 17 24 28 22 16 20 33 23 18 23 26 23 15 24 16 16 16 16 17 15 15 16 14 11 9 23 17 13 13 18 12 19 20 30 20 20 15 21 19 16 18 20 23 19 15 10 11 15 19 13 22 22 18 19 16 19 23 16 10 25 23 20 21 20 31 19 19 18 15 22 18 14 13 21 18 19 22 19 16 17 21 14 20 26 18 26 22 19 26 19 20 22 15 13 24 23 15 21 21 21 27 18 22 19 24 17 22 16 18 23 10 12 3 5 3 3 0 0 0.190000 4.350 4.350 10.30 3502025 3 0 0 0 0 0 0 0 0 0 0 0 0 3 0 3 2 3 4 4 3 4 5 10 7 6 6 4 5 12 10 6 6 13 10 6 7 14 9 6 13 10 12 16 3 9 9 7 5 6 13 11 10 8 11 19 12 14 13 16 13 14 9 12 14 13 14 16 10 14 7 16 18 16 9 15 11 20 15 10 14 14 11 14 17 10 6 16 10 15 12 17 17 20 15 7 12 23 15 8 13 12 8 16 15 20 16 16 20 14 11 20 24 23 20 16 18 27 25 31 27 27 25 21 31 27 20 23 24 32 17 21 34 27 17 19 19 25 30 27 21 24 28 30 19 26 21 14 16 21 23 27 8 17 21 17 11 23 15 22 15 18 10 17 20 23 18 18 17 19 22 15 22 21 19 23 18 18 26 17 18 26 18 24 15 22 23 23 19 23 25 23 24 26 10 21 16 32 23 18 19 24 21 28 26 22 19 19 14 30 21 24 23 22 21 13 27 20 27 24 15 20 22 22 13 25 14 19 32 21 18 18 23 22 22 14 18 20 24 14 19 20 18 17 24 29 27 20 12 18 17 11 9 2 3 2 1 0 0.192000 4.400 4.400 10.40 3593938 3 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 2 3 4 7 8 1 5 6 8 3 7 5 4 9 8 8 7 7 9 7 9 9 15 5 7 8 15 14 9 9 13 8 8 15 10 7 10 9 10 14 7 8 18 16 17 11 14 15 13 8 15 8 15 18 16 16 22 12 8 16 13 10 13 13 10 21 11 10 16 16 13 13 17 16 20 23 13 22 16 14 15 22 19 22 15 22 24 16 16 16 19 12 15 16 17 20 18 19 26 17 23 18 32 20 28 36 22 25 30 29 31 36 24 24 21 29 24 32 29 30 23 34 19 33 34 25 20 31 27 24 16 14 21 20 13 24 17 28 13 24 16 26 15 26 21 11 15 20 13 20 18 25 23 18 24 26 22 16 22 14 13 16 20 24 25 19 29 20 15 20 16 25 26 21 22 17 24 22 21 17 23 23 15 19 30 23 17 21 19 18 21 26 14 29 24 20 33 19 15 20 23 28 19 23 25 15 19 17 31 23 18 29 26 25 14 24 25 18 19 19 24 35 31 23 23 14 15 19 11 20 19 24 17 16 9 10 12 3 2 2 0 1 0.194000 4.450 4.450 10.50 3712573 7 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 5 3 5 4 3 11 3 10 4 6 7 8 5 5 5 8 9 12 7 7 11 8 6 7 9 10 13 10 6 13 9 9 9 11 14 14 12 13 10 6 13 13 15 12 13 19 8 14 13 16 11 13 14 15 9 15 16 13 16 17 17 17 23 18 16 19 10 13 18 16 10 9 21 11 22 14 20 14 18 13 15 12 13 14 16 14 15 20 29 17 14 18 8 15 21 15 19 15 22 20 17 15 23 26 16 26 24 23 23 23 23 30 24 29 28 26 35 33 31 22 23 22 20 37 22 27 33 26 27 26 17 16 18 27 22 21 24 18 18 18 17 15 18 14 19 24 22 15 20 21 15 19 25 15 16 26 19 22 29 20 16 13 15 16 32 24 23 13 33 17 22 18 18 23 24 22 21 20 26 21 16 22 18 18 16 15 26 26 17 22 21 13 25 24 13 23 18 18 25 32 20 24 21 17 19 24 24 23 33 19 19 21 32 18 22 23 19 23 32 18 31 22 25 23 23 31 29 21 16 20 20 15 22 14 12 5 10 9 2 1 0 1 0.196000 4.500 4.500 10.60 3829518 3 0 0 0 0 0 0 0 0 0 0 1 2 2 1 6 2 6 5 9 3 5 6 8 6 3 8 10 7 11 9 4 8 9 5 11 10 13 9 16 13 10 9 5 12 9 15 10 13 9 12 18 14 19 9 13 14 12 13 21 17 17 18 16 13 12 16 14 18 10 15 15 16 11 15 22 17 19 17 11 12 26 12 17 19 18 21 20 27 17 18 19 21 14 19 16 12 16 21 20 18 8 17 17 13 13 18 15 19 15 19 20 28 21 29 27 27 34 24 26 31 25 24 16 17 23 23 30 28 18 28 32 28 37 18 26 18 16 33 21 31 21 20 22 19 20 25 18 18 20 11 17 20 22 23 14 14 17 18 20 25 20 19 20 22 19 16 33 25 21 21 24 18 16 22 29 22 16 27 26 28 21 20 22 17 25 23 20 23 18 16 19 26 22 21 22 23 15 20 19 17 23 19 20 15 22 18 22 26 23 23 31 17 29 18 13 15 19 18 24 22 28 22 17 23 24 26 21 23 25 24 29 26 18 41 24 29 22 27 23 28 16 30 24 18 23 19 17 18 21 17 14 8 2 5 2 0 0 0.198000 4.550 4.550 10.70 3950740 3 0 0 0 0 0 0 0 0 0 1 1 1 2 1 3 7 5 6 7 7 7 4 5 6 4 1 8 9 10 9 8 10 8 12 6 10 8 10 8 11 9 10 15 7 11 8 13 11 13 15 15 17 12 10 8 17 12 9 14 12 14 11 14 21 14 15 20 18 16 8 15 22 24 14 10 18 14 15 16 12 10 16 21 16 25 17 20 17 17 20 15 24 15 17 22 25 17 13 22 18 20 19 11 21 22 21 16 21 24 16 22 17 21 17 24 22 24 35 27 24 28 24 32 37 34 25 24 29 37 37 25 28 21 23 24 22 21 20 25 22 32 19 21 22 24 20 21 20 22 18 27 17 14 20 22 22 22 14 19 20 20 21 23 22 14 20 21 23 20 18 23 20 25 31 24 18 22 14 23 22 21 23 27 27 20 21 18 22 23 24 23 21 18 22 17 22 21 35 15 24 24 12 27 30 27 28 22 31 24 24 19 27 24 28 23 25 26 35 27 22 29 21 24 18 19 26 33 29 31 23 25 19 24 26 21 10 23 24 26 28 20 27 26 17 29 22 18 14 22 8 10 11 4 4 1 2 0 0.200000 4.600 4.600 10.80 4068161 5 0 0 0 0 0 0 0 0 0 0 1 1 0 1 5 5 2 9 3 11 6 9 8 7 7 8 3 3 13 10 8 7 5 8 13 8 7 14 12 10 7 15 13 13 11 12 12 14 12 13 12 10 15 11 14 7 16 15 8 15 13 15 13 18 13 17 21 15 12 13 13 17 18 18 18 16 19 20 17 14 17 24 13 12 18 19 19 13 21 18 26 21 23 16 14 18 19 13 33 13 19 20 14 20 23 14 26 19 22 21 21 16 27 30 25 28 22 32 21 30 27 31 21 30 22 27 27 31 27 21 17 38 41 17 21 20 19 30 24 27 20 20 21 30 20 19 19 31 25 24 13 21 23 19 24 33 24 17 20 17 12 25 23 18 24 11 24 25 22 33 20 11 22 31 21 20 26 27 21 26 24 14 23 23 20 20 26 28 10 20 27 24 22 17 27 28 20 23 23 33 20 24 26 32 33 29 21 25 24 17 18 19 27 26 20 24 26 24 24 26 21 19 24 21 36 32 18 33 33 20 23 25 33 19 27 25 27 24 27 21 21 23 28 18 27 25 19 24 15 17 12 15 7 2 1 0 0 ", "%f ", Inf);
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
405 %! assert (rows (x) == n);
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
406
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
407 %% Note use fprintf so output not sent to stdout
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
408 %!test
19278
6ca096827123 Use tempname() rather than tmpnam() in core Octave.
Rik <rik@octave.org>
parents: 18619
diff changeset
409 %! nm = tempname ();
28098
501553fcf6e2 unlink: throw error if operation fails and nargout == 0 (bug #57830).
Rik <rik@octave.org>
parents: 27923
diff changeset
410 %! fid1 = fopen (nm, "w");
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
411 %! x = fprintf (fid1, "%s: %d\n", "test", 1);
16213
b1283d4c06c2 test: Use Octave coding standards for scripts in test/ directory.
Rik <rik@octave.org>
parents: 16030
diff changeset
412 %! fclose (fid1);
28098
501553fcf6e2 unlink: throw error if operation fails and nargout == 0 (bug #57830).
Rik <rik@octave.org>
parents: 27923
diff changeset
413 %! fid2 = fopen (nm, "r");
501553fcf6e2 unlink: throw error if operation fails and nargout == 0 (bug #57830).
Rik <rik@octave.org>
parents: 27923
diff changeset
414 %! str = fscanf (fid2, "%s");
16213
b1283d4c06c2 test: Use Octave coding standards for scripts in test/ directory.
Rik <rik@octave.org>
parents: 16030
diff changeset
415 %! fclose (fid2);
b1283d4c06c2 test: Use Octave coding standards for scripts in test/ directory.
Rik <rik@octave.org>
parents: 16030
diff changeset
416 %! unlink (nm);
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
417 %! assert (x, 8);
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
418 %! assert (str, "test:1");
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
419
21634
96518f623c91 Backed out changeset dcf8922b724b
Mike Miller <mtmiller@octave.org>
parents: 21633
diff changeset
420 %!error printf (1)
96518f623c91 Backed out changeset dcf8922b724b
Mike Miller <mtmiller@octave.org>
parents: 21633
diff changeset
421 %!error <Invalid call to printf> printf ()
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
422
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
423 %!test
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
424 %! [s, msg, status] = sprintf ("%s: %d\n", "test", 1);
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
425 %! assert (s == "test: 1\n" && ischar (msg) && status == 8);
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
426
17292
c5073ed27cdc Handle '+' format modifier in sprintf (bug #39773)
Rik <rik@octave.org>
parents: 17288
diff changeset
427 %!assert (sprintf ("%-+6.2f", Inf), "+Inf ")
c5073ed27cdc Handle '+' format modifier in sprintf (bug #39773)
Rik <rik@octave.org>
parents: 17288
diff changeset
428 %!assert (sprintf ("%-6.2f", Inf), "Inf ")
c5073ed27cdc Handle '+' format modifier in sprintf (bug #39773)
Rik <rik@octave.org>
parents: 17288
diff changeset
429 %!assert (sprintf ("%-+6.2f", nan), "+NaN ") # lowercase nan is part of test
c5073ed27cdc Handle '+' format modifier in sprintf (bug #39773)
Rik <rik@octave.org>
parents: 17288
diff changeset
430 %!assert (sprintf ("%-6.2f", nan), "NaN ")
c5073ed27cdc Handle '+' format modifier in sprintf (bug #39773)
Rik <rik@octave.org>
parents: 17288
diff changeset
431 %!assert (sprintf ("%-+6.2f", NA), "+NA ")
c5073ed27cdc Handle '+' format modifier in sprintf (bug #39773)
Rik <rik@octave.org>
parents: 17288
diff changeset
432 %!assert (sprintf ("%-6.2f", NA), "NA ")
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
433
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
434 %!error <Invalid call to sprintf> sprintf ()
17292
c5073ed27cdc Handle '+' format modifier in sprintf (bug #39773)
Rik <rik@octave.org>
parents: 17288
diff changeset
435 %!error <format TEMPLATE must be a string> sprintf (1)
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
436
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
437 %!test
17415
3856298f1ff8 eliminate unimplemented vax and cray floating point formats
John W. Eaton <jwe@octave.org>
parents: 17292
diff changeset
438 %! arch_list = {"native"; "ieee-le"; "ieee-be"};
17292
c5073ed27cdc Handle '+' format modifier in sprintf (bug #39773)
Rik <rik@octave.org>
parents: 17288
diff changeset
439 %! warning ("off", "Octave:fopen-mode");
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
440 %! status = 1;
16215
6fe6ac8bbfdb test: Remove trailing spaces from ends of lines in test/ directory.
Rik <rik@octave.org>
parents: 16213
diff changeset
441 %!
17417
9289bb0ff4dd io.tst: fix for-loop upper bound after change 3856298f1ff8
Andreas Weber <andy.weber.aw@gmail.com>
parents: 17415
diff changeset
442 %! for i = 1:3
16590
2d968b7830d6 handle A, R, and W fopen modes correctly (bug #38851)
John W. Eaton <jwe@octave.org>
parents: 16215
diff changeset
443 %! arch = arch_list{i};
2d968b7830d6 handle A, R, and W fopen modes correctly (bug #38851)
John W. Eaton <jwe@octave.org>
parents: 16215
diff changeset
444 %! for j = 1:4
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
445 %! if (j == 1)
16590
2d968b7830d6 handle A, R, and W fopen modes correctly (bug #38851)
John W. Eaton <jwe@octave.org>
parents: 16215
diff changeset
446 %! mode_list = {"w"; "r"; "a"};
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
447 %! elseif (j == 2)
16590
2d968b7830d6 handle A, R, and W fopen modes correctly (bug #38851)
John W. Eaton <jwe@octave.org>
parents: 16215
diff changeset
448 %! mode_list = {"w+"; "r+"; "a+"};
2d968b7830d6 handle A, R, and W fopen modes correctly (bug #38851)
John W. Eaton <jwe@octave.org>
parents: 16215
diff changeset
449 %! elseif (j == 3)
2d968b7830d6 handle A, R, and W fopen modes correctly (bug #38851)
John W. Eaton <jwe@octave.org>
parents: 16215
diff changeset
450 %! mode_list = {"W"; "R"; "A"};
2d968b7830d6 handle A, R, and W fopen modes correctly (bug #38851)
John W. Eaton <jwe@octave.org>
parents: 16215
diff changeset
451 %! elseif (j == 4)
2d968b7830d6 handle A, R, and W fopen modes correctly (bug #38851)
John W. Eaton <jwe@octave.org>
parents: 16215
diff changeset
452 %! mode_list = {"W+"; "R+"; "A+"};
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
453 %! endif
19278
6ca096827123 Use tempname() rather than tmpnam() in core Octave.
Rik <rik@octave.org>
parents: 18619
diff changeset
454 %! nm = tempname ();
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
455 %! for k = 1:3
16590
2d968b7830d6 handle A, R, and W fopen modes correctly (bug #38851)
John W. Eaton <jwe@octave.org>
parents: 16215
diff changeset
456 %! mode = mode_list{k};
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
457 %! [id, err] = fopen (nm, mode, arch);
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
458 %! if (id < 0)
16019
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14675
diff changeset
459 %! __printf_assert__ ("open failed: %s (%s, %s): %s\n", nm, mode, arch, err);
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
460 %! status = 0;
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
461 %! break;
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
462 %! else
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
463 %! fclose (id);
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
464 %! endif
16994
333243133364 Use matrix concatenation for strings, rather than cstrcat(), for clarity and performance.
Rik <rik@octave.org>
parents: 16937
diff changeset
465 %! tmp_mode = [mode, "b"];
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
466 %! [id, err] = fopen (nm, tmp_mode, arch);
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
467 %! if (id < 0)
16019
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14675
diff changeset
468 %! __printf_assert__ ("open failed: %s (%s, %s): %s\n", nm, tmp_mode, arch, err);
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
469 %! status = 0;
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
470 %! break;
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
471 %! else
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
472 %! fclose (id);
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
473 %! endif
16994
333243133364 Use matrix concatenation for strings, rather than cstrcat(), for clarity and performance.
Rik <rik@octave.org>
parents: 16937
diff changeset
474 %! tmp_mode = [mode, "t"];
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
475 %! [id, err] = fopen (nm, tmp_mode, arch);
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
476 %! if (id < 0)
16019
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14675
diff changeset
477 %! __printf_assert__ ("open failed: %s (%s, %s): %s\n", nm, tmp_mode, arch, err);
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
478 %! status = 0;
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
479 %! break;
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
480 %! else
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
481 %! fclose (id);
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
482 %! endif
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
483 %! endfor
5725
c02d2aa25cfd [project @ 2006-04-01 00:40:18 by jwe]
jwe
parents: 5590
diff changeset
484 %! unlink (nm);
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
485 %! if (status == 0)
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
486 %! break;
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
487 %! endif
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
488 %! endfor
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
489 %! if (status == 0)
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
490 %! break;
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
491 %! endif
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
492 %! endfor
16215
6fe6ac8bbfdb test: Remove trailing spaces from ends of lines in test/ directory.
Rik <rik@octave.org>
parents: 16213
diff changeset
493 %!
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
494 %! assert (status == 1);
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
495
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
496 %!test
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
497 %! s.a = 1;
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
498 %! fail ("fopen (s)");
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
499
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
500 %!error fopen ("foo", "x")
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
501
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
502 %! fopen ("foo", "wb", "noodle");
16019
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14675
diff changeset
503 %! assert (__prog_output_assert__ ("error:"));
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
504
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
505 %!error <Invalid call to fopen> fopen ()
26705
c13143821eef Add front-end support for encodings in "fopen" (bug #55452).
Markus Mützel <markus.muetzel@gmx.de>
parents: 26698
diff changeset
506 %!error <Invalid call to fopen> fopen ("foo", "wb", "native", "utf-8", 1)
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
507
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
508 %!error fclose (0)
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
509 %!error <Invalid call to fclose> fclose (1, 2)
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
510
19278
6ca096827123 Use tempname() rather than tmpnam() in core Octave.
Rik <rik@octave.org>
parents: 18619
diff changeset
511 %!assert (ischar (tempname ()))
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
512
21581
6fab85c1538f maint: Follow Octave conventions for use of semicolon in BIST tests.
Rik <rik@octave.org>
parents: 21580
diff changeset
513 %!error <DIR must be a string> tempname (1)
6fab85c1538f maint: Follow Octave conventions for use of semicolon in BIST tests.
Rik <rik@octave.org>
parents: 21580
diff changeset
514 %!error <PREFIX must be a string> tempname ("foo", 1)
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
515
19278
6ca096827123 Use tempname() rather than tmpnam() in core Octave.
Rik <rik@octave.org>
parents: 18619
diff changeset
516 %!error <Invalid call to tempname> tempname (1, 2, 3)
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
517
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
518 %!test
24461
0a034d34a686 Modify BIST tests to pass when string_fill_char is not ' '.
Rik <rik@octave.org>
parents: 23965
diff changeset
519 %! type_list = {"char"; "char*1"; "integer*1"; "int8";
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
520 %! "schar"; "signed char"; "uchar"; "unsigned char";
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
521 %! "short"; "ushort"; "unsigned short"; "int";
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
522 %! "uint"; "unsigned int"; "long"; "ulong"; "unsigned long";
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
523 %! "float"; "float32"; "real*4"; "double"; "float64";
24461
0a034d34a686 Modify BIST tests to pass when string_fill_char is not ' '.
Rik <rik@octave.org>
parents: 23965
diff changeset
524 %! "real*8"; "int16"; "integer*2"; "int32"; "integer*4"};
16215
6fe6ac8bbfdb test: Remove trailing spaces from ends of lines in test/ directory.
Rik <rik@octave.org>
parents: 16213
diff changeset
525 %!
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
526 %! n = rows (type_list);
19278
6ca096827123 Use tempname() rather than tmpnam() in core Octave.
Rik <rik@octave.org>
parents: 18619
diff changeset
527 %! nm = tempname ();
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
528 %! id = fopen (nm, "wb");
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
529 %! if (id > 0)
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
530 %! for i = 1:n
24461
0a034d34a686 Modify BIST tests to pass when string_fill_char is not ' '.
Rik <rik@octave.org>
parents: 23965
diff changeset
531 %! fwrite (id, i, type_list{i});
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
532 %! endfor
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
533 %!
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
534 %! fclose (id);
16215
6fe6ac8bbfdb test: Remove trailing spaces from ends of lines in test/ directory.
Rik <rik@octave.org>
parents: 16213
diff changeset
535 %!
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
536 %! id = fopen (nm, "rb");
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
537 %! if (id > 0)
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
538 %! x = zeros (1, n);
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
539 %! for i = 1:n
24461
0a034d34a686 Modify BIST tests to pass when string_fill_char is not ' '.
Rik <rik@octave.org>
parents: 23965
diff changeset
540 %! x(i) = fread (id, [1, 1], type_list{i});
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
541 %! endfor
16215
6fe6ac8bbfdb test: Remove trailing spaces from ends of lines in test/ directory.
Rik <rik@octave.org>
parents: 16213
diff changeset
542 %!
25505
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
543 %! fclose (id);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
544 %!
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
545 %! if (x == 1:n)
16019
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14675
diff changeset
546 %! __printf_assert__ ("ok\n");
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
547 %! endif
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
548 %! endif
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
549 %! endif
16215
6fe6ac8bbfdb test: Remove trailing spaces from ends of lines in test/ directory.
Rik <rik@octave.org>
parents: 16213
diff changeset
550 %!
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
551 %! unlink (nm);
16019
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14675
diff changeset
552 %! assert (__prog_output_assert__ ("ok"));
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
553
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
554 %!test
23093
8aba6d170887 fix prototype of octave_base_int<T>::write (bug #50157)
John W. Eaton <jwe@octave.org>
parents: 22812
diff changeset
555 %! classes = {"int8", "int16", "int32", "int64", ...
8aba6d170887 fix prototype of octave_base_int<T>::write (bug #50157)
John W. Eaton <jwe@octave.org>
parents: 22812
diff changeset
556 %! "uint8", "uint16", "uint32", "uint64", ...
8aba6d170887 fix prototype of octave_base_int<T>::write (bug #50157)
John W. Eaton <jwe@octave.org>
parents: 22812
diff changeset
557 %! "single", "double"};
25505
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
558 %! n = numel (classes);
23093
8aba6d170887 fix prototype of octave_base_int<T>::write (bug #50157)
John W. Eaton <jwe@octave.org>
parents: 22812
diff changeset
559 %! nm = tempname ();
25505
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
560 %! mode = "wb+";
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
561 %! [id, err] = fopen (nm, mode);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
562 %! if (id < 0)
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
563 %! __printf_assert__ ("open failed: %s (%s): %s\n", nm, mode, err);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
564 %! else
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
565 %! unwind_protect
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
566 %! for i = 1:n
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
567 %! cls = classes{i};
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
568 %! s_in = ones (1, 1, cls);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
569 %! m_in = ones (2, 2, cls);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
570 %! m_shape = size (m_in);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
571 %! frewind (id);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
572 %! fwrite (id, s_in, cls);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
573 %! fwrite (id, m_in, cls);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
574 %! frewind (id);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
575 %! s_out = fread (id, numel (s_in), sprintf ("%s=>%s", cls, cls));
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
576 %! m_out = fread (id, numel (m_in), sprintf ("%s=>%s", cls, cls));
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
577 %! m_out = reshape (m_out, m_shape);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
578 %! assert (s_in, s_out);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
579 %! assert (m_in, m_out);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
580 %! endfor
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
581 %! unwind_protect_cleanup
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
582 %! fclose (id);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
583 %! end_unwind_protect
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
584 %! unlink (nm);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
585 %! endif
23093
8aba6d170887 fix prototype of octave_base_int<T>::write (bug #50157)
John W. Eaton <jwe@octave.org>
parents: 22812
diff changeset
586
25673
a8b0fb44ed94 add some bug numbers to the test suite
John W. Eaton <jwe@octave.org>
parents: 25505
diff changeset
587 %!test <54386>
18616
aa861a98d84d fwrite: don't convert to octave_int for char output types
John W. Eaton <jwe@octave.org>
parents: 18519
diff changeset
588 %! x = char (128:255)';
19278
6ca096827123 Use tempname() rather than tmpnam() in core Octave.
Rik <rik@octave.org>
parents: 18619
diff changeset
589 %! nm = tempname ();
25505
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
590 %! mode = "wb";
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
591 %! [id, err] = fopen (nm, mode);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
592 %! if (id < 0)
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
593 %! __printf_assert__ ("open failed: %s (%s): %s\n", nm, mode, err);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
594 %! else
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
595 %! fwrite (id, x);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
596 %! fclose (id);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
597 %! mode = "rb";
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
598 %! [id, err] = fopen (nm, mode);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
599 %! if (id < 0)
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
600 %! __printf_assert__ ("open failed: %s (%s): %s\n", nm, mode, err);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
601 %! else
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
602 %! y = fread (id, Inf, "uchar=>char");
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
603 %! fclose (id);
25673
a8b0fb44ed94 add some bug numbers to the test suite
John W. Eaton <jwe@octave.org>
parents: 25505
diff changeset
604 %! assert (y, x);
25505
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
605 %! unlink (nm);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
606 %! endif
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
607 %! endif
18616
aa861a98d84d fwrite: don't convert to octave_int for char output types
John W. Eaton <jwe@octave.org>
parents: 18519
diff changeset
608
aa861a98d84d fwrite: don't convert to octave_int for char output types
John W. Eaton <jwe@octave.org>
parents: 18519
diff changeset
609 %!test
19278
6ca096827123 Use tempname() rather than tmpnam() in core Octave.
Rik <rik@octave.org>
parents: 18619
diff changeset
610 %! nm = tempname ();
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
611 %! id = fopen (nm, "wb");
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
612 %! if (id > 0)
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
613 %! fprintf (id, "%d\n", 1:100);
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
614 %! fclose (id);
25505
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
615 %! mode = "rb";
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
616 %! id = fopen (nm, mode);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
617 %! if (id < 0)
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
618 %! __printf_assert__ ("open failed: %s (%s): %s\n", nm, mode, err);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
619 %! else
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
620 %! for i = 1:101
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
621 %! fgets (id);
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
622 %! endfor
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
623 %! if (feof (id))
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
624 %! fclose (id);
25505
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
625 %! mode = "rb";
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
626 %! [id, err] = fopen (nm, mode);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
627 %! if (id < 0)
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
628 %! __printf_assert__ ("open failed: %s (%s): %s\n", nm, mode, err);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
629 %! else
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
630 %! unwind_protect
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
631 %! pos_one = ftell (id);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
632 %! s_one = fgets (id);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
633 %! for i = 1:48
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
634 %! s = fgets (id);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
635 %! endfor
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
636 %! pos_fifty = ftell (id);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
637 %! s_fifty = fgets (id);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
638 %! fseek (id, pos_one, SEEK_SET);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
639 %! s_one_x = fgets (id);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
640 %! fseek (id, pos_fifty, SEEK_SET);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
641 %! s_fifty_x = fgets (id);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
642 %! if (s_one == s_one_x && s_fifty == s_fifty_x)
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
643 %! frewind (id);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
644 %! s_one_x = fgets (id);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
645 %! if (s_one != s_one_x)
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
646 %! error ("bombed!!");
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
647 %! endif
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
648 %! endif
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
649 %! unwind_protect_cleanup
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
650 %! fclose (id);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
651 %! end_unwind_protect
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
652 %! endif
25505
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
653 %! else
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
654 %! fclose (id);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
655 %! __printf_assert__ ("EOF not reached when expected to: %s (%s)\n", nm, mode);
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
656 %! endif
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
657 %! endif
25505
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
658 %! unlink (nm);
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
659 %! endif
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
660
26705
c13143821eef Add front-end support for encodings in "fopen" (bug #55452).
Markus Mützel <markus.muetzel@gmx.de>
parents: 26698
diff changeset
661 %!test # write to and read from file with encoding
c13143821eef Add front-end support for encodings in "fopen" (bug #55452).
Markus Mützel <markus.muetzel@gmx.de>
parents: 26698
diff changeset
662 %! temp_file = [tempname(), ".txt"];
26706
ccea3574f36b Support encoding of file streams in textscan (bug #55452).
Markus Mützel <markus.muetzel@gmx.de>
parents: 26705
diff changeset
663 %! fid = fopen (temp_file, "wt", "n", "iso-8859-1");
26705
c13143821eef Add front-end support for encodings in "fopen" (bug #55452).
Markus Mützel <markus.muetzel@gmx.de>
parents: 26698
diff changeset
664 %! unwind_protect
c13143821eef Add front-end support for encodings in "fopen" (bug #55452).
Markus Mützel <markus.muetzel@gmx.de>
parents: 26698
diff changeset
665 %! [name, mode, arch, codepage] = fopen (fid);
c13143821eef Add front-end support for encodings in "fopen" (bug #55452).
Markus Mützel <markus.muetzel@gmx.de>
parents: 26698
diff changeset
666 %! assert (name, temp_file);
c13143821eef Add front-end support for encodings in "fopen" (bug #55452).
Markus Mützel <markus.muetzel@gmx.de>
parents: 26698
diff changeset
667 %! assert (mode, "w");
26706
ccea3574f36b Support encoding of file streams in textscan (bug #55452).
Markus Mützel <markus.muetzel@gmx.de>
parents: 26705
diff changeset
668 %! assert (codepage, "iso-8859-1");
26865
dfd0a2cdb621 Fix fopen test failing on Windows.
Markus Mützel <markus.muetzel@gmx.de>
parents: 26717
diff changeset
669 %! fprintf (fid, "aäu %s", "AÄU");
26705
c13143821eef Add front-end support for encodings in "fopen" (bug #55452).
Markus Mützel <markus.muetzel@gmx.de>
parents: 26698
diff changeset
670 %! fclose (fid);
c13143821eef Add front-end support for encodings in "fopen" (bug #55452).
Markus Mützel <markus.muetzel@gmx.de>
parents: 26698
diff changeset
671 %! # open in binary mode
c13143821eef Add front-end support for encodings in "fopen" (bug #55452).
Markus Mützel <markus.muetzel@gmx.de>
parents: 26698
diff changeset
672 %! fid2 = fopen (temp_file, "rb");
c13143821eef Add front-end support for encodings in "fopen" (bug #55452).
Markus Mützel <markus.muetzel@gmx.de>
parents: 26698
diff changeset
673 %! [name, mode, arch, codepage] = fopen (fid2);
c13143821eef Add front-end support for encodings in "fopen" (bug #55452).
Markus Mützel <markus.muetzel@gmx.de>
parents: 26698
diff changeset
674 %! assert (name, temp_file);
c13143821eef Add front-end support for encodings in "fopen" (bug #55452).
Markus Mützel <markus.muetzel@gmx.de>
parents: 26698
diff changeset
675 %! assert (mode, "rb");
c13143821eef Add front-end support for encodings in "fopen" (bug #55452).
Markus Mützel <markus.muetzel@gmx.de>
parents: 26698
diff changeset
676 %! assert (codepage, "utf-8");
c13143821eef Add front-end support for encodings in "fopen" (bug #55452).
Markus Mützel <markus.muetzel@gmx.de>
parents: 26698
diff changeset
677 %! read_binary = fread (fid2);
c13143821eef Add front-end support for encodings in "fopen" (bug #55452).
Markus Mützel <markus.muetzel@gmx.de>
parents: 26698
diff changeset
678 %! fclose (fid2);
26865
dfd0a2cdb621 Fix fopen test failing on Windows.
Markus Mützel <markus.muetzel@gmx.de>
parents: 26717
diff changeset
679 %! assert (read_binary, [97 228 117 32 65 196 85].');
26705
c13143821eef Add front-end support for encodings in "fopen" (bug #55452).
Markus Mützel <markus.muetzel@gmx.de>
parents: 26698
diff changeset
680 %! # open in text mode with correct encoding
26706
ccea3574f36b Support encoding of file streams in textscan (bug #55452).
Markus Mützel <markus.muetzel@gmx.de>
parents: 26705
diff changeset
681 %! fid3 = fopen (temp_file, "rt", "n", "iso-8859-1");
26705
c13143821eef Add front-end support for encodings in "fopen" (bug #55452).
Markus Mützel <markus.muetzel@gmx.de>
parents: 26698
diff changeset
682 %! read_text = fscanf (fid3, "%s");
c13143821eef Add front-end support for encodings in "fopen" (bug #55452).
Markus Mützel <markus.muetzel@gmx.de>
parents: 26698
diff changeset
683 %! fclose (fid3);
c13143821eef Add front-end support for encodings in "fopen" (bug #55452).
Markus Mützel <markus.muetzel@gmx.de>
parents: 26698
diff changeset
684 %! assert (read_text, "aäuAÄU");
c13143821eef Add front-end support for encodings in "fopen" (bug #55452).
Markus Mützel <markus.muetzel@gmx.de>
parents: 26698
diff changeset
685 %! unwind_protect_cleanup
c13143821eef Add front-end support for encodings in "fopen" (bug #55452).
Markus Mützel <markus.muetzel@gmx.de>
parents: 26698
diff changeset
686 %! unlink (temp_file);
c13143821eef Add front-end support for encodings in "fopen" (bug #55452).
Markus Mützel <markus.muetzel@gmx.de>
parents: 26698
diff changeset
687 %! end_unwind_protect
c13143821eef Add front-end support for encodings in "fopen" (bug #55452).
Markus Mützel <markus.muetzel@gmx.de>
parents: 26698
diff changeset
688
21634
96518f623c91 Backed out changeset dcf8922b724b
Mike Miller <mtmiller@octave.org>
parents: 21633
diff changeset
689 %!assert (fputs (1, 1),-1)
96518f623c91 Backed out changeset dcf8922b724b
Mike Miller <mtmiller@octave.org>
parents: 21633
diff changeset
690
96518f623c91 Backed out changeset dcf8922b724b
Mike Miller <mtmiller@octave.org>
parents: 21633
diff changeset
691 %!error <Invalid call to fputs> fputs ()
96518f623c91 Backed out changeset dcf8922b724b
Mike Miller <mtmiller@octave.org>
parents: 21633
diff changeset
692 %!error <Invalid call to fputs> fputs (1, "foo", 1)
96518f623c91 Backed out changeset dcf8922b724b
Mike Miller <mtmiller@octave.org>
parents: 21633
diff changeset
693
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
694 %!error fgetl ("foo", 1)
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
695
17292
c5073ed27cdc Handle '+' format modifier in sprintf (bug #39773)
Rik <rik@octave.org>
parents: 17288
diff changeset
696 %!error <Invalid call to fgetl> fgetl ()
c5073ed27cdc Handle '+' format modifier in sprintf (bug #39773)
Rik <rik@octave.org>
parents: 17288
diff changeset
697 %!error <Invalid call to fgetl> fgetl (1, 2, 3)
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
698
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
699 %!error fgets ("foo", 1)
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
700
17292
c5073ed27cdc Handle '+' format modifier in sprintf (bug #39773)
Rik <rik@octave.org>
parents: 17288
diff changeset
701 %!error <Invalid call to fgets> fgets ()
c5073ed27cdc Handle '+' format modifier in sprintf (bug #39773)
Rik <rik@octave.org>
parents: 17288
diff changeset
702 %!error <Invalid call to fgets> fgets (1, 2, 3)
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
703
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
704 %!test
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
705 %! s.a = 1;
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
706 %! fail ("fprintf (s)", "Invalid call to fprintf");
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
707
17292
c5073ed27cdc Handle '+' format modifier in sprintf (bug #39773)
Rik <rik@octave.org>
parents: 17288
diff changeset
708 %!error <Invalid call to fprintf> fprintf ()
c5073ed27cdc Handle '+' format modifier in sprintf (bug #39773)
Rik <rik@octave.org>
parents: 17288
diff changeset
709 %!error <Invalid call to fprintf> fprintf (1)
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
710 %!error fprintf (1, 1)
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
711 %!error fprintf (-1, "foo")
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
712
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
713 %!error fscanf ("foo", "bar")
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
714
17292
c5073ed27cdc Handle '+' format modifier in sprintf (bug #39773)
Rik <rik@octave.org>
parents: 17288
diff changeset
715 %!error <Invalid call to fscanf> fscanf ()
c5073ed27cdc Handle '+' format modifier in sprintf (bug #39773)
Rik <rik@octave.org>
parents: 17288
diff changeset
716 %!error <Invalid call to fscanf> fscanf (1)
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
717
17292
c5073ed27cdc Handle '+' format modifier in sprintf (bug #39773)
Rik <rik@octave.org>
parents: 17288
diff changeset
718 %!error <Invalid call to fread> fread ()
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
719 %!error <Invalid call to fread> fread (1, 2, "char", 1, "native", 2)
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
720 %!error fread ("foo")
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
721
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
722 %!error <Invalid call to fwrite> fwrite ()
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
723 %!error <Invalid call to fwrite> fwrite (1, rand (10), "char", 1, "native", 2)
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
724 %!error fwrite ("foo", 1)
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
725
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
726 %!error <Invalid call to feof> feof ()
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
727 %!error <Invalid call to feof> feof (1, 2)
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
728 %!error feof ("foo")
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
729
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
730 %!error <Invalid call to ferror> ferror ()
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
731 %!error <Invalid call to ferror> ferror (1, 'clear', 2)
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
732 %!error ferror ("foo")
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
733
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
734 %!error <Invalid call to ftell> ftell ()
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
735 %!error <Invalid call to ftell> ftell (1, 2)
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
736 %!error ftell ("foo")
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
737
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
738 %!error <Invalid call to fseek> fseek ()
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
739 %!error <Invalid call to fseek> fseek (1, 0, SEEK_SET, 1)
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
740 %!error fseek ("foo", 0, SEEK_SET)
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
741
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
742 %!error <Invalid call to frewind> frewind ()
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
743 %!error <Invalid call to frewind> frewind (1, 2)
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 13915
diff changeset
744 %!error frewind ("foo")
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
745
18210
a0abcf377ec5 return elements read, not bytes in fread second output (bug #41091)
John W. Eaton <jwe@octave.org>
parents: 17744
diff changeset
746 %!test
25505
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
747 %! [id, msg] = tmpfile ();
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
748 %! if (id < 0)
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
749 %! __printf_assert__ ("tmpfile failed: %s\n", msg);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
750 %! else
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
751 %! unwind_protect
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
752 %! ## FIXME: better test for endianness?
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
753 %! big_endian = (bitunpack (uint16 (1))(1) == 0);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
754 %! fwrite (id, "abcdefg");
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
755 %! frewind (id);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
756 %! [data, count] = fread (id);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
757 %! assert (data, [97; 98; 99; 100; 101; 102; 103]);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
758 %! assert (count, 7);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
759 %! frewind (id);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
760 %! [data, count] = fread (id, 'int16');
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
761 %! expected = [25185; 25699; 26213];
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
762 %! if (big_endian)
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
763 %! expected = double (swapbytes (int16 (expected)));
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
764 %! endif
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
765 %! assert (data, expected);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
766 %! assert (count, 3);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
767 %! frewind (id);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
768 %! [data, count] = fread (id, [10, 2], 'int16');
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
769 %! assert (data, expected);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
770 %! assert (count, 3);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
771 %! frewind (id);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
772 %! [data, count] = fread (id, [2, 10], 'int16');
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
773 %! expected = [25185, 26213; 25699, 0];
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
774 %! if (big_endian)
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
775 %! expected = double (swapbytes (int16 (expected)));
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
776 %! endif
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
777 %! assert (data, expected);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
778 %! assert (count, 3);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
779 %! unwind_protect_cleanup
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
780 %! fclose (id);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
781 %! end_unwind_protect
21458
348e335c49dd Fix failing BIST tests on big-endian systems
Mike Miller <mtmiller@octave.org>
parents: 21317
diff changeset
782 %! endif
18512
fdd27f68b011 handle fread skip parameter correctly (bug #41648)
Rik <rik@octave.org> and John W. Eaton <jwe@octave.org>
parents: 18210
diff changeset
783
fdd27f68b011 handle fread skip parameter correctly (bug #41648)
Rik <rik@octave.org> and John W. Eaton <jwe@octave.org>
parents: 18210
diff changeset
784 %!test
25505
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
785 %! [id, msg] = tmpfile ();
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
786 %! if (id < 0)
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
787 %! __printf_assert__ ("tmpfile failed: %s\n", msg);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
788 %! else
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
789 %! unwind_protect
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
790 %! fwrite (id, char (0:15));
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
791 %! frewind (id);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
792 %! [data, count] = fread (id, inf, "2*uint8", 2);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
793 %! assert (data, [0; 1; 4; 5; 8; 9; 12; 13]);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
794 %! assert (count, 8);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
795 %! unwind_protect_cleanup
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
796 %! fclose (id);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
797 %! end_unwind_protect
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
798 %! endif
18518
0bdecd41b2dd correctly size fread result (bug #41648)
John W. Eaton <jwe@octave.org>
parents: 18512
diff changeset
799
0bdecd41b2dd correctly size fread result (bug #41648)
John W. Eaton <jwe@octave.org>
parents: 18512
diff changeset
800 %!test
25505
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
801 %! [id, msg] = tmpfile ();
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
802 %! if (id < 0)
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
803 %! __printf_assert__ ("tmpfile failed: %s\n", msg);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
804 %! else
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
805 %! unwind_protect
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
806 %! fwrite (id, char (0:15));
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
807 %! frewind (id);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
808 %! [data, count] = fread (id, 3, "2*uint8", 3);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
809 %! assert (data, [0; 1; 5]);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
810 %! assert (count, 3);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
811 %! [data, count] = fread (id, 3, "2*uint8", 3);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
812 %! assert (data, [6; 7; 11]);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
813 %! assert (count, 3);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
814 %! [data, count] = fread (id, 3, "2*uint8", 3);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
815 %! assert (data, [12; 13]);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
816 %! assert (count, 2);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
817 %! [data, count] = fread (id, 3, "2*uint8", 3);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
818 %! assert (data, []);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
819 %! assert (count, 0);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
820 %! unwind_protect_cleanup
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
821 %! fclose (id);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
822 %! end_unwind_protect
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
823 %! endif
18518
0bdecd41b2dd correctly size fread result (bug #41648)
John W. Eaton <jwe@octave.org>
parents: 18512
diff changeset
824
0bdecd41b2dd correctly size fread result (bug #41648)
John W. Eaton <jwe@octave.org>
parents: 18512
diff changeset
825 %!test
25505
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
826 %! [id, msg] = tmpfile ();
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
827 %! if (id < 0)
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
828 %! __printf_assert__ ("tmpfile failed: %s\n", msg);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
829 %! else
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
830 %! unwind_protect
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
831 %! ## FIXME: better test for endianness?
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
832 %! big_endian = (bitunpack (uint16 (1))(1) == 0);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
833 %! fwrite (id, char (0:15));
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
834 %! frewind (id);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
835 %! [data, count] = fread (id, [1, Inf], "4*uint16", 3);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
836 %! expected = [256, 770, 1284, 1798, 3083, 3597];
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
837 %! if (big_endian)
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
838 %! expected = double (swapbytes (uint16 (expected)));
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
839 %! endif
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
840 %! assert (data, expected);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
841 %! assert (count, 6);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
842 %! unwind_protect_cleanup
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
843 %! fclose (id);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
844 %! end_unwind_protect
21458
348e335c49dd Fix failing BIST tests on big-endian systems
Mike Miller <mtmiller@octave.org>
parents: 21317
diff changeset
845 %! endif
18518
0bdecd41b2dd correctly size fread result (bug #41648)
John W. Eaton <jwe@octave.org>
parents: 18512
diff changeset
846
0bdecd41b2dd correctly size fread result (bug #41648)
John W. Eaton <jwe@octave.org>
parents: 18512
diff changeset
847 %!test
25505
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
848 %! [id, msg] = tmpfile ();
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
849 %! if (id < 0)
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
850 %! __printf_assert__ ("tmpfile failed: %s\n", msg);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
851 %! else
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
852 %! unwind_protect
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
853 %! ## FIXME: better test for endianness?
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
854 %! big_endian = (bitunpack (uint16 (1))(1) == 0);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
855 %! fwrite (id, char (0:15));
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
856 %! frewind (id);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
857 %! [data, count] = fread (id, [3, Inf], "4*uint16", 3);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
858 %! expected = [256, 1798; 770, 3083; 1284, 3597];
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
859 %! if (big_endian)
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
860 %! expected = double (swapbytes (uint16 (expected)));
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
861 %! endif
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
862 %! assert (data, expected);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
863 %! assert (count, 6);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
864 %! unwind_protect_cleanup
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
865 %! fclose (id);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
866 %! end_unwind_protect
21458
348e335c49dd Fix failing BIST tests on big-endian systems
Mike Miller <mtmiller@octave.org>
parents: 21317
diff changeset
867 %! endif
19331
a791930c3bda oct-stream.cc::read: Fix calculation of nc when EOF gets hit (bug #43517)
Andreas Weber <andy.weber.aw@gmail.com>
parents: 18616
diff changeset
868
a791930c3bda oct-stream.cc::read: Fix calculation of nc when EOF gets hit (bug #43517)
Andreas Weber <andy.weber.aw@gmail.com>
parents: 18616
diff changeset
869 %!test
25505
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
870 %! [id, msg] = tmpfile ();
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
871 %! if (id < 0)
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
872 %! __printf_assert__ ("tmpfile failed: %s\n", msg);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
873 %! else
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
874 %! unwind_protect
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
875 %! fwrite (id, "abcd");
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
876 %! frewind (id);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
877 %! [data, count] = fread (id, [2, 3], "char");
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
878 %! assert (data, [97, 99; 98, 100]);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
879 %! assert (count, 4);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
880 %! unwind_protect_cleanup
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
881 %! fclose (id);
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
882 %! end_unwind_protect
6aa29920a531 Pair fclose() with all fopen() and prevent file-io.cc test fails (bug #54180).
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25054
diff changeset
883 %! endif
19729
17a7e9f26e50 improve compatibility of printf functions
John W. Eaton <jwe@octave.org>
parents: 19697
diff changeset
884
21317
a4faec57f4c8 maint: remove semicolon after %!assert tests to follow Octave conventions.
Rik <rik@octave.org>
parents: 21296
diff changeset
885 %!assert (sprintf ("%1s", "foo"), "foo")
a4faec57f4c8 maint: remove semicolon after %!assert tests to follow Octave conventions.
Rik <rik@octave.org>
parents: 21296
diff changeset
886 %!assert (sprintf ("%.s", "foo"), char (zeros (1, 0)))
a4faec57f4c8 maint: remove semicolon after %!assert tests to follow Octave conventions.
Rik <rik@octave.org>
parents: 21296
diff changeset
887 %!assert (sprintf ("%1.s", "foo"), " ")
a4faec57f4c8 maint: remove semicolon after %!assert tests to follow Octave conventions.
Rik <rik@octave.org>
parents: 21296
diff changeset
888 %!assert (sprintf ("%.1s", "foo"), "f")
a4faec57f4c8 maint: remove semicolon after %!assert tests to follow Octave conventions.
Rik <rik@octave.org>
parents: 21296
diff changeset
889 %!assert (sprintf ("%1.1s", "foo"), "f")
a4faec57f4c8 maint: remove semicolon after %!assert tests to follow Octave conventions.
Rik <rik@octave.org>
parents: 21296
diff changeset
890 %!assert (sprintf ("|%4s|", "foo"), "| foo|")
a4faec57f4c8 maint: remove semicolon after %!assert tests to follow Octave conventions.
Rik <rik@octave.org>
parents: 21296
diff changeset
891 %!assert (sprintf ("|%-4s|", "foo"), "|foo |")
a4faec57f4c8 maint: remove semicolon after %!assert tests to follow Octave conventions.
Rik <rik@octave.org>
parents: 21296
diff changeset
892 %!assert (sprintf ("|%4.1s|", "foo"), "| f|")
a4faec57f4c8 maint: remove semicolon after %!assert tests to follow Octave conventions.
Rik <rik@octave.org>
parents: 21296
diff changeset
893 %!assert (sprintf ("|%-4.1s|", "foo"), "|f |")
19729
17a7e9f26e50 improve compatibility of printf functions
John W. Eaton <jwe@octave.org>
parents: 19697
diff changeset
894
21317
a4faec57f4c8 maint: remove semicolon after %!assert tests to follow Octave conventions.
Rik <rik@octave.org>
parents: 21296
diff changeset
895 %!assert (sprintf ("%c ", "foo"), "f o o ")
a4faec57f4c8 maint: remove semicolon after %!assert tests to follow Octave conventions.
Rik <rik@octave.org>
parents: 21296
diff changeset
896 %!assert (sprintf ("%s ", "foo"), "foo ")
19729
17a7e9f26e50 improve compatibility of printf functions
John W. Eaton <jwe@octave.org>
parents: 19697
diff changeset
897
21317
a4faec57f4c8 maint: remove semicolon after %!assert tests to follow Octave conventions.
Rik <rik@octave.org>
parents: 21296
diff changeset
898 %!assert (sprintf ("|%d|", "foo"), "|102||111||111|")
a4faec57f4c8 maint: remove semicolon after %!assert tests to follow Octave conventions.
Rik <rik@octave.org>
parents: 21296
diff changeset
899 %!assert (sprintf ("|%s|", [102, 111, 111]), "|foo|")
19729
17a7e9f26e50 improve compatibility of printf functions
John W. Eaton <jwe@octave.org>
parents: 19697
diff changeset
900
21317
a4faec57f4c8 maint: remove semicolon after %!assert tests to follow Octave conventions.
Rik <rik@octave.org>
parents: 21296
diff changeset
901 %!assert (sprintf ("%s %d ", [102, 1e5, 111, 1e5, 111]), "f 100000 o 100000 o ")
19729
17a7e9f26e50 improve compatibility of printf functions
John W. Eaton <jwe@octave.org>
parents: 19697
diff changeset
902
21317
a4faec57f4c8 maint: remove semicolon after %!assert tests to follow Octave conventions.
Rik <rik@octave.org>
parents: 21296
diff changeset
903 %!assert (sprintf ("%c,%c,%c,%c", "abcd"), "a,b,c,d")
a4faec57f4c8 maint: remove semicolon after %!assert tests to follow Octave conventions.
Rik <rik@octave.org>
parents: 21296
diff changeset
904 %!assert (sprintf ("%s,%s,%s,%s", "abcd"), "abcd,")
20256
7ab81a9fa065 io.tst: Add tests for printf hex or octal conversion on string inputs
Mike Miller <mtmiller@octave.org>
parents: 19729
diff changeset
905
21317
a4faec57f4c8 maint: remove semicolon after %!assert tests to follow Octave conventions.
Rik <rik@octave.org>
parents: 21296
diff changeset
906 %!assert (sprintf ("|%x|", "Octave"), "|4f||63||74||61||76||65|")
a4faec57f4c8 maint: remove semicolon after %!assert tests to follow Octave conventions.
Rik <rik@octave.org>
parents: 21296
diff changeset
907 %!assert (sprintf ("|%X|", "Octave"), "|4F||63||74||61||76||65|")
a4faec57f4c8 maint: remove semicolon after %!assert tests to follow Octave conventions.
Rik <rik@octave.org>
parents: 21296
diff changeset
908 %!assert (sprintf ("|%o|", "Octave"), "|117||143||164||141||166||145|")
20256
7ab81a9fa065 io.tst: Add tests for printf hex or octal conversion on string inputs
Mike Miller <mtmiller@octave.org>
parents: 19729
diff changeset
909
21296
596e19e7e571 fix printf regression (bug #47192)
John W. Eaton <jwe@octave.org>
parents: 20257
diff changeset
910 ## bug #47192
596e19e7e571 fix printf regression (bug #47192)
John W. Eaton <jwe@octave.org>
parents: 20257
diff changeset
911 %!assert (sprintf ("%s", repmat ("blah", 2, 1)), "bbllaahh")
596e19e7e571 fix printf regression (bug #47192)
John W. Eaton <jwe@octave.org>
parents: 20257
diff changeset
912 %!assert (sprintf ("%c", repmat ("blah", 2, 1)), "bbllaahh")
596e19e7e571 fix printf regression (bug #47192)
John W. Eaton <jwe@octave.org>
parents: 20257
diff changeset
913 %!assert (sprintf ("%c %c %s", repmat ("blah", 2, 1)), "b b llaahh")
22812
86b6f79d4de1 better compatibility for printf with empty args (bug #39375)
John W. Eaton <jwe@octave.org>
parents: 22755
diff changeset
914
86b6f79d4de1 better compatibility for printf with empty args (bug #39375)
John W. Eaton <jwe@octave.org>
parents: 22755
diff changeset
915 ## bug #39735
86b6f79d4de1 better compatibility for printf with empty args (bug #39375)
John W. Eaton <jwe@octave.org>
parents: 22755
diff changeset
916 %!assert (sprintf ("a %d b", []), "a b")
86b6f79d4de1 better compatibility for printf with empty args (bug #39375)
John W. Eaton <jwe@octave.org>
parents: 22755
diff changeset
917 %!assert (sprintf ("a %d b", ''), "a b")
86b6f79d4de1 better compatibility for printf with empty args (bug #39375)
John W. Eaton <jwe@octave.org>
parents: 22755
diff changeset
918 %!assert (sprintf ("a %d b", ' '), "a 32 b")
86b6f79d4de1 better compatibility for printf with empty args (bug #39375)
John W. Eaton <jwe@octave.org>
parents: 22755
diff changeset
919 %!assert (sprintf ("a %s b", []), "a b")
86b6f79d4de1 better compatibility for printf with empty args (bug #39375)
John W. Eaton <jwe@octave.org>
parents: 22755
diff changeset
920 %!assert (sprintf ("a %s b", ''), "a b")
86b6f79d4de1 better compatibility for printf with empty args (bug #39375)
John W. Eaton <jwe@octave.org>
parents: 22755
diff changeset
921 %!assert (sprintf ("a %s b", ' '), "a b")
24753
ca6a73be15da allow NUL characters in printf and scanf formats (bug #53148)
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
922
ca6a73be15da allow NUL characters in printf and scanf formats (bug #53148)
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
923 %!assert <*53148> (double (sprintf ("B\0B")), [66, 0, 66])
ca6a73be15da allow NUL characters in printf and scanf formats (bug #53148)
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
924 %!assert <*53148> (sscanf ("B\0B 13", "B\0B %d"), 13)
28220
6cccc3c82175 attempt to work around Windows ftello/fseeko bug (bug #58055)
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
925
6cccc3c82175 attempt to work around Windows ftello/fseeko bug (bug #58055)
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
926 %!test <58055>
6cccc3c82175 attempt to work around Windows ftello/fseeko bug (bug #58055)
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
927 %! w_modes = {"wb", "wt"};
6cccc3c82175 attempt to work around Windows ftello/fseeko bug (bug #58055)
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
928 %! r_modes = {"rb", "rt"};
6cccc3c82175 attempt to work around Windows ftello/fseeko bug (bug #58055)
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
929 %! f_texts = {"foo\nbar\nbaz\n", "foo\rbar\rbaz\r", "foo\r\nbar\r\nbaz\r\n"};
6cccc3c82175 attempt to work around Windows ftello/fseeko bug (bug #58055)
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
930 %! for i = 1:numel (w_modes)
6cccc3c82175 attempt to work around Windows ftello/fseeko bug (bug #58055)
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
931 %! w_mode = w_modes{i};
6cccc3c82175 attempt to work around Windows ftello/fseeko bug (bug #58055)
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
932 %! for j = 1:numel (r_modes);
6cccc3c82175 attempt to work around Windows ftello/fseeko bug (bug #58055)
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
933 %! r_mode = r_modes{j};
6cccc3c82175 attempt to work around Windows ftello/fseeko bug (bug #58055)
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
934 %! for k = 1:numel (f_texts);
6cccc3c82175 attempt to work around Windows ftello/fseeko bug (bug #58055)
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
935 %! f_text = f_texts{k};
6cccc3c82175 attempt to work around Windows ftello/fseeko bug (bug #58055)
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
936 %! fname = tempname ()
6cccc3c82175 attempt to work around Windows ftello/fseeko bug (bug #58055)
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
937 %! fid = fopen (fname, w_mode);
6cccc3c82175 attempt to work around Windows ftello/fseeko bug (bug #58055)
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
938 %! unwind_protect
6cccc3c82175 attempt to work around Windows ftello/fseeko bug (bug #58055)
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
939 %! fprintf (fid, "%s", f_text);
6cccc3c82175 attempt to work around Windows ftello/fseeko bug (bug #58055)
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
940 %! fclose (fid);
6cccc3c82175 attempt to work around Windows ftello/fseeko bug (bug #58055)
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
941 %! fid = fopen (fname, r_mode)
6cccc3c82175 attempt to work around Windows ftello/fseeko bug (bug #58055)
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
942 %! fgetl (fid);
6cccc3c82175 attempt to work around Windows ftello/fseeko bug (bug #58055)
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
943 %! pos = ftell (fid);
6cccc3c82175 attempt to work around Windows ftello/fseeko bug (bug #58055)
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
944 %! buf1 = fgetl (fid);
6cccc3c82175 attempt to work around Windows ftello/fseeko bug (bug #58055)
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
945 %! fgetl (fid);
6cccc3c82175 attempt to work around Windows ftello/fseeko bug (bug #58055)
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
946 %! fseek (fid, pos, SEEK_SET);
6cccc3c82175 attempt to work around Windows ftello/fseeko bug (bug #58055)
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
947 %! buf2 = fgetl (fid);
6cccc3c82175 attempt to work around Windows ftello/fseeko bug (bug #58055)
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
948 %! assert (buf1, buf2);
6cccc3c82175 attempt to work around Windows ftello/fseeko bug (bug #58055)
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
949 %! unwind_protect_cleanup
6cccc3c82175 attempt to work around Windows ftello/fseeko bug (bug #58055)
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
950 %! fclose (fid);
6cccc3c82175 attempt to work around Windows ftello/fseeko bug (bug #58055)
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
951 %! unlink (fname);
6cccc3c82175 attempt to work around Windows ftello/fseeko bug (bug #58055)
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
952 %! end_unwind_protect
6cccc3c82175 attempt to work around Windows ftello/fseeko bug (bug #58055)
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
953 %! endfor
6cccc3c82175 attempt to work around Windows ftello/fseeko bug (bug #58055)
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
954 %! endfor
6cccc3c82175 attempt to work around Windows ftello/fseeko bug (bug #58055)
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
955 %! endfor