# HG changeset patch # User address@hidden # Date 1239110269 -7200 # Node ID 74dddf6cb6edf76aa22c7984727cc83f622019a3 # Parent 25cdd60964428c7110d7a971c73f4adeb27cc5e5 Add a test for saving and reading a matrix with the "-ascii" format diff -r 25cdd6096442 -r 74dddf6cb6ed test/ChangeLog --- a/test/ChangeLog Tue Apr 07 03:30:59 2009 -0400 +++ b/test/ChangeLog Tue Apr 07 15:17:49 2009 +0200 @@ -1,3 +1,8 @@ +2009-04-07 Carlo de Falco + + * test_io.m: Add a test for saving and reading a matrix with the + "-ascii" format. + 2009-03-10 Jason Riedy * test_diag_perm.m: Add tests for permuting sparse matrices and diff -r 25cdd6096442 -r 74dddf6cb6ed test/test_io.m --- a/test/test_io.m Tue Apr 07 03:30:59 2009 -0400 +++ b/test/test_io.m Tue Apr 07 15:17:49 2009 +0200 @@ -220,6 +220,11 @@ %! %! delete struct.dat; %! +%!test +%! matrix1 = rand(100, 2); +%! save -ascii matrix.ascii matrix1 +%! matrix2 = load ("matrix.ascii"); +%! assert (matrix1, matrix2, 1e-9) %% 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