Mercurial > hg > octave-avbm
changeset 9102:9dc516d36175
Add a test for saving and reading a matrix with the "-ascii" format
author | Carlo de Falco <carlo.defalco@gmail.com> |
---|---|
date | Tue, 07 Apr 2009 15:17:49 +0200 |
parents | 25cdd6096442 |
children | 10bed8fbec99 |
files | test/ChangeLog test/test_io.m |
diffstat | 2 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,8 @@ +2009-04-07 Carlo de Falco <kingcrimson@tiscali.it> + + * test_io.m: Add a test for saving and reading a matrix with the + "-ascii" format. + 2009-03-10 Jason Riedy <jason@acm.org> * test_diag_perm.m: Add tests for permuting sparse matrices and
--- a/test/test_io.m +++ b/test/test_io.m @@ -220,6 +220,13 @@ %! %! delete struct.dat; %! +%!test +%! matrix1 = rand(100, 2); +%! save -ascii matrix.ascii matrix1 +%! matrix2 = load ("matrix.ascii"); +%! assert (matrix1, matrix2, 1e-9) +%! +%! delete matrix.ascii; %% FIXME Disable this test as it writes to stdout and there is no easy %% way to recover output. Need to spawn new octave process and pipe stdout