octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: patch for io.tst


From: Rik
Subject: Re: patch for io.tst
Date: Sun, 22 Dec 2013 10:25:46 -0800

On 12/22/2013 07:15 AM, address@hidden wrote:
> Message: 1
> Date: Sun, 22 Dec 2013 15:46:05 +0100
> From: "c." <address@hidden>
> To: Daniel J Sebald <address@hidden>
> Cc: "John W. Eaton" <address@hidden>, octave-maintainers
>       <address@hidden>
> Subject: Re: Octave 3.8.0-rc2 release candidate available for ftp
> Message-ID: <address@hidden>
> Content-Type: text/plain; charset="iso-8859-1"
>
>
> On 22 Dec 2013, at 10:00, c. <address@hidden> wrote:
>
>> > As I pointed out before, the test failures in "io.tst" are bogus, 
>> > they only appear when running "__run_test_suite__" or  "make check", 
>> > otherwise (if running the code directly or through "test io.tst")
>> > there is no failure:
>> > 
>>>> >>> test /opt/local/share/octave/3.8.0-rc2/etc/tests/fixed/io.tst
>> > PASSES 85 out of 85 tests
> The attached changeset solves the problem for me.
> Is it OK to push? Which branch should it go on?

Carlo,

Is this line of the patch necessary?

-%!      eval (sprintf ("save %s %s %s", opts{i}, files{i}, vars));
+%!      eval (sprintf ("save %s %s %s", files{i}, opts{i}, vars));

According to the documentation for save, options should come first.

 -- Command:  save file
 -- Command:  save options file
 -- Command:  save options file V1 V2 ...
 -- Command:  save options file -struct STRUCT F1 F2 ...

Second thought is that it might make the code look cleaner if you defined a
filename variable to hold the temporary filename for each test rather than
using the fullfile syntax every time. 

Example:

fname = fullfile (P_tmpdir, "matrix.ascii");
save ("-ascii", fname, "matrix1")
matrix2 = load (fname);
assert (matrix1, matrix2)
delete (fname);

Cheers,
Rik


reply via email to

[Prev in Thread] Current Thread [Next in Thread]