Mercurial > hg > octave-lyh
changeset 8640:34b9a5743388
fix gzip test code - use filesep()
author | Benjamin Lindner <lindnerb@users.sourceforge.net> |
---|---|
date | Fri, 30 Jan 2009 13:39:16 -0500 |
parents | 399af34bb4bf |
children | 2264092e9f39 |
files | scripts/miscellaneous/gzip.m |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/miscellaneous/gzip.m +++ b/scripts/miscellaneous/gzip.m @@ -53,19 +53,19 @@ %! mkdir(dirname); %! entry = gzip(filename, dirname); %! [path, basename, extension] = fileparts(filename); -%! if ! strcmp(entry, [dirname, "/", basename, extension, ".gz"]) +%! if ! strcmp(entry, [dirname, filesep, basename, extension, ".gz"]) %! error("gzipped file does not match expected name!"); %! endif %! if ! exist(entry, "file") %! error("gzipped file cannot be found!"); %! endif %! gunzip(entry); -%! if (system(sprintf("diff %s %s/%s%s", filename, dirname, +%! if (system(sprintf("diff %s %s%c%s%s", filename, dirname, filesep, %! basename, extension))) %! error("unzipped file not equal to original file!"); %! end %! unwind_protect_cleanup %! delete(filename); -%! delete([dirname, "/", basename, extension]); +%! delete([dirname, filesep, basename, extension]); %! rmdir(dirname); %! end_unwind_protect