changeset 19569:827cc33ae05c

avoid warning message in test for tar function * tar.m: Avoid warning message from GNU tar about stripping leading '/' from file names.
author John W. Eaton <jwe@octave.org>
date Mon, 05 Jan 2015 11:36:33 -0500
parents 5ab6fcf32d1e
children ffbd2cc7ca91
files scripts/miscellaneous/tar.m
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/miscellaneous/tar.m	Mon Dec 29 18:26:12 2014 +0000
+++ b/scripts/miscellaneous/tar.m	Mon Jan 05 11:36:33 2015 -0500
@@ -77,12 +77,14 @@
 
 %!xtest
 %! ## test gzip together with gunzip
+%! orig_dir = pwd ();
 %! unwind_protect
 %!   dirname = tempname;
 %!   assert (mkdir (dirname));
-%!   dirname2 = fullfile (dirname, "dir2");
+%!   chdir (dirname);
+%!   dirname2 = "dir2";
 %!   assert (mkdir (dirname2));
-%!   fname1 = fullfile (dirname, "f1");
+%!   fname1 = "f1";
 %!   fname2 = fullfile (dirname2, "f2");
 %!   fid = fopen (fname1, "wt");
 %!   assert (fid >= 0);
@@ -117,6 +119,7 @@
 %!   confirm_recursive_rmdir (false, "local");
 %!   rmdir (dirname, "s");
 %!   rmdir (outdir, "s");
+%!   chdir (orig_dir);
 %! end_unwind_protect
 
 ## Test input validation