# HG changeset patch # User jwe # Date 1125348927 0 # Node ID a42806a03f8fd6a62cd7aeb79e008687f2b3d5bb # Parent 6ddb5a7f399e93cf4cef0ee47181b401cd622a79 [project @ 2005-08-29 20:55:27 by jwe] diff --git a/test/octave.test/io/fopen-1.m b/test/octave.test/io/fopen-1.m --- a/test/octave.test/io/fopen-1.m +++ b/test/octave.test/io/fopen-1.m @@ -9,18 +9,10 @@ mode_list = ["w"; "r"; "a"]; elseif (j == 2) mode_list = ["w+"; "r+"; "a+"]; - elseif (j == 3) - mode_list = ["wb"; "rb"; "ab"]; - elseif (j == 4) - mode_list = ["w+b"; "r+b"; "a+b"]; - elseif (j == 5) - mode_list = ["wt"; "rt"; "at"]; - elseif (j == 6) - mode_list = ["w+t"; "r+t"; "a+t"]; endif nm = tmpnam (); for k = 1:3 - mode = deblank (mode_list (k,:)); + mode = deblank (mode_list (k,:)) [id, err] = fopen (nm, mode, arch); if (id < 0) printf ("open failed: %s (%s, %s): %s\n", nm, mode, arch, err); @@ -29,10 +21,19 @@ else fclose (id); endif - mode = strcat (mode, "b"); - [id, err] = fopen (nm, mode, arch); + tmp_mode = strcat (mode, "b"); + [id, err] = fopen (nm, tmp_mode, arch); if (id < 0) - printf ("open failed: %s (%s, %s): %s\n", nm, mode, arch, err); + printf ("open failed: %s (%s, %s): %s\n", nm, tmp_mode, arch, err); + status = 0; + break; + else + fclose (id); + endif + tmp_mode = strcat (mode, "t"); + [id, err] = fopen (nm, tmp_mode, arch); + if (id < 0) + printf ("open failed: %s (%s, %s): %s\n", nm, tmp_mode, arch, err); status = 0; break; else