Mercurial > octave-nkf
diff test/octave.test/system/rename-1.m @ 2742:eeb061f9cdbf
[project @ 1997-02-26 04:29:07 by jwe]
author | jwe |
---|---|
date | Wed, 26 Feb 1997 04:29:48 +0000 |
parents | |
children | 6ddb5a7f399e |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/octave.test/system/rename-1.m Wed Feb 26 04:29:48 1997 +0000 @@ -0,0 +1,16 @@ +from = tmpnam (); +to = tmpnam (); +id = fopen (from, "w"); +if (id > 0 && fclose (id) == 0) + [s, e] = stat (from); + if (! e) + if (rename (from, to) == 0) + [s, e] = stat (from); + if (e < 0) + [s, e] = stat (to); + e == 0 + unlink (to); + endif + endif + endif +endif