[CHANGESET] Make "test doc" work with gzipped info file

Rafael Laboissiere rafael at debian.org
Tue Jun 2 16:20:19 CDT 2009


The changeset attached below fixes a bug when running "test doc" in
Debian.  It is really minor, but was bugging me.

Rafael
-------------- next part --------------
# HG changeset patch
# User Rafael Laboissiere <rafael at debian.org>
# Date 1243977356 -7200
# Node ID 7285f782de7c1cd7efc684e5f7830c6c7a910ff1
# Parent  a407e894ec74019b1bd5aeec8db3724450aa818a
In test, look also for the gzipped version of the info_file

The info program accepts .info files that are compressed with gzip. Consider
also the info_file with the suffix ".gz" when doing the test.

diff -r a407e894ec74 -r 7285f782de7c scripts/ChangeLog
--- a/scripts/ChangeLog	Tue Jun 02 21:29:09 2009 +0200
+++ b/scripts/ChangeLog	Tue Jun 02 23:15:56 2009 +0200
@@ -1,3 +1,8 @@ 2009-05-29  John W. Eaton  <jwe at octave.o
+2009-06-02  Rafael Laboissiere  <rafael at debian.org>
+
+	* help/doc.m: In test, look also for the gzipped version of the
+	info_file
+
 2009-05-29  John W. Eaton  <jwe at octave.org>
 
 	* plot/__gnuplot_get_var__.m: Insert missing semicolon.
diff -r a407e894ec74 -r 7285f782de7c scripts/help/doc.m
--- a/scripts/help/doc.m	Tue Jun 02 21:29:09 2009 +0200
+++ b/scripts/help/doc.m	Tue Jun 02 23:15:56 2009 +0200
@@ -106,6 +106,6 @@ function retval = doc (fname)
 
 endfunction
 
-%!test if exist( info_file ()) != 2
-%!       error ("Info file %s does not exist!", info_file ());
+%!test if exist( info_file ()) != 2 && exist (sprintf ("%s.gz", info_file ())) != 2
+%!       error ("Info file %s or %s.gz does not exist!", info_file (), info_file ());
 %!     endif


More information about the Bug-octave mailing list