Hello community,

here is the log from the commit of package octave-forge-doctest for 
openSUSE:Factory checked in at 2017-01-29 10:33:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/octave-forge-doctest (Old)
 and      /work/SRC/openSUSE:Factory/.octave-forge-doctest.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "octave-forge-doctest"

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/octave-forge-doctest/octave-forge-doctest.changes    
    2016-06-14 23:07:33.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.octave-forge-doctest.new/octave-forge-doctest.changes
   2017-02-03 17:51:42.897841757 +0100
@@ -1,0 +2,9 @@
+Thu Nov 24 14:09:56 UTC 2016 - [email protected]
+
+- Update to version 0.5.0
+  * SKIP_IF and other conditional directives can include small single-line
+    blocks of code.
+  * Recursion into subdirectories is now the default.
+  * In Texinfo mode, skip tests without output by default.
+
+-------------------------------------------------------------------

Old:
----
  doctest-0.4.1.tar.gz

New:
----
  doctest-0.5.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ octave-forge-doctest.spec ++++++
--- /var/tmp/diff_new_pack.KQlygs/_old  2017-02-03 17:51:43.253791570 +0100
+++ /var/tmp/diff_new_pack.KQlygs/_new  2017-02-03 17:51:43.257791006 +0100
@@ -18,7 +18,7 @@
 
 %define octpkg  doctest
 Name:           octave-forge-%{octpkg}
-Version:        0.4.1
+Version:        0.5.0
 Release:        0
 Summary:        Octave-Forge documentation tests
 License:        GPL-3.0+ and BSD-3-Clause
@@ -27,7 +27,7 @@
 Source0:        
http://downloads.sourceforge.net/octave/%{octpkg}-%{version}.tar.gz
 BuildRequires:  gcc-c++
 BuildRequires:  octave-devel
-Requires:       octave-cli
+Requires:       octave-cli >= 4.0.0
 
 %description
 The Octave-Forge Doctest package finds specially-formatted blocks of example

++++++ doctest-0.4.1.tar.gz -> doctest-0.5.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/doctest-0.4.1/DESCRIPTION 
new/doctest-0.5.0/DESCRIPTION
--- old/doctest-0.4.1/DESCRIPTION       2016-01-04 19:13:29.000000000 +0100
+++ new/doctest-0.5.0/DESCRIPTION       2016-11-14 07:08:14.000000000 +0100
@@ -1,6 +1,6 @@
 Name: doctest
-Version: 0.4.1
-Date: 2016-01-04
+Version: 0.5.0
+Date: 2016-11-13
 Author: various authors
 Maintainer: Colin B. Macdonald <[email protected]>, Michael Walter 
<[email protected]>
 Title: Documentation tests
@@ -9,5 +9,6 @@
  the code and confirms the output is correct.  This can be useful as part of
  a testing framework or simply to ensure that documentation stays up-to-date
  during software development.
+Depends: octave (>= 4.0.0)
 Url: https://github.com/catch22/octave-doctest
-License: modified BSD
+License: BSD-3-Clause
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/doctest-0.4.1/NEWS new/doctest-0.5.0/NEWS
--- old/doctest-0.4.1/NEWS      2016-01-04 19:13:29.000000000 +0100
+++ new/doctest-0.5.0/NEWS      2016-11-14 07:08:14.000000000 +0100
@@ -1,3 +1,24 @@
+doctest 0.5.0 (2016-11-13)
+==========================
+
+  * SKIP_IF and other conditional directives can include small single-line
+    blocks of code.  For example:
+
+      - "% doctest: +SKIP_IF(foo() && bar(42))"
+
+  * Recursion into subdirectories is now the default; pass "-nonrecursive"
+    for the previous default behaviour.
+
+  * In Texinfo mode, skip tests without output by default.  This is an
+    experimental change to help test the GNU Octave project; the feature
+    might disappear without warning in a future version.
+
+  * Workaround regex bug on ARM architecture.
+
+  * Minimum supported Octave version is now 4.0.0.
+
+
+
 doctest 0.4.1 (2016-01-04)
 ==========================
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/doctest-0.4.1/inst/doctest.m 
new/doctest-0.5.0/inst/doctest.m
--- old/doctest-0.4.1/inst/doctest.m    2016-01-04 19:13:29.000000000 +0100
+++ new/doctest-0.5.0/inst/doctest.m    2016-11-14 07:08:14.000000000 +0100
@@ -1,5 +1,5 @@
 %% Copyright (c) 2010 Thomas Grenfell Smith
-%% Copyright (c) 2011, 2013-2015 Michael Walter
+%% Copyright (c) 2011, 2013-2016 Michael Walter
 %% Copyright (c) 2015-2016 Colin B. Macdonald
 %%
 %% Redistribution and use in source and binary forms, with or without
@@ -30,12 +30,10 @@
 
 %% -*- texinfo -*-
 %% @documentencoding UTF-8
-%% @deftypefn  {Function File} {} doctest @var{target}
-%% @deftypefnx {Function File} {} doctest @var{target} -recursive
-%% @deftypefnx {Function File} {} doctest @var{target} -DIRECTIVE
-%% @deftypefnx {Function File} {} doctest @var{target} +DIRECTIVE
-%% @deftypefnx {Function File} {@var{success} =} doctest (@var{target}, 
@dots{})
-%% @deftypefnx {Function File} {[@var{numpass}, @var{numtests}, @var{summary]} 
=} doctest (@dots{})
+%% @deftypefn  {} {} doctest @var{target}
+%% @deftypefnx {} {} doctest @var{target} -nonrecursive
+%% @deftypefnx {} {@var{success} =} doctest (@var{target}, @dots{})
+%% @deftypefnx {} {[@var{numpass}, @var{numtests}, @var{summary}] =} doctest 
(@dots{})
 %% Run examples embedded in documentation.
 %%
 %% Doctest finds and runs code found in @var{target}, which can be a:
@@ -43,8 +41,7 @@
 %% @item function;
 %% @item class;
 %% @item Texinfo file;
-%% @item directory/folder (pass @code{-recursive} to descend
-%%       into subfolders);
+%% @item directory/folder (pass @code{-nonrecursive} to skip subfolders);
 %% @item cell array of such items.
 %% @end itemize
 %% When called with a single return value, return whether all tests have
@@ -171,8 +168,8 @@
 %% @end example
 %%
 %% Doctest provides the default flags @code{DOCTEST_OCTAVE} and
-%% @code{DOCTEST_MATLAB}, but you can access arbitrary variables and
-%% (nullary) functions.
+%% @code{DOCTEST_MATLAB}, but you can call functions and access arbitrary
+%% variables (including those defined by previous tests).
 %%
 %%
 %% By default, all adjacent white space is collapsed into a single space
@@ -194,29 +191,35 @@
 %%
 %% To disable the @code{...} wildcard, use the @code{-ELLIPSIS} directive.
 %%
-%% The default directives can be overridden on the command line using, for
-%% example, @code{doctest target -NORMALIZE_WHITESPACE +ELLIPSIS}.  Note that
-%% directives local to a test still take precident over these.
-%%
-%%
 %% @strong{Diary Style}
 %% When the m-file contains plaintext documentation, doctest finds tests
 %% by searching for lines that begin with @code{>>}.  It then finds the
 %% expected output by searching for the next @code{>>} or two blank lines.
 %%
 %% @strong{Octave/Texinfo Style}
-%% If your m-file contains Texinfo markup, then doctest finds code inside
-%% @code{@@example @dots{} @@end example} blocks.  Some comments:
+%% If your m-file contains Texinfo markup, then doctest finds code in
+%% @code{@@example @dots{} @@end example} blocks.  Note:
 %% @itemize
 %% @item The two-blank-lines convention is not required.
-%% @item The use of @code{>>} is not required as Octave documentation
-%%       conventionally indicates output with @code{@@print} and
-%%       @code{@@result}.  Ambiguities are resolving by assuming output
+%% @item The use of @code{>>} is neither required nor recommended as Octave
+%%       documentation conventionally indicates output with @code{@@result@{@}}
+%%       and @code{@@print@{@}}.  Ambiguities are resolving by assuming output
 %%       is indented further than input.
-%% @item You are free to use diary-style doctests inside
-%%       @code{@@example} blocks.
 %% @end itemize
 %%
+%% A typical Texinfo-style doctest looks like:
+%% @example
+%% a = 5;
+%% b = a + 1
+%%   @result{} b = 6
+%% disp("hello\nthere")
+%%   @print{} hello
+%%   @print{} there
+%% @end example
+%%
+%% The two styles are not mutually exclusive: this documentation is written
+%% in Texinfo using a hybrid approach.
+%%
 %% @seealso{test}
 %% @end deftypefn
 
@@ -238,7 +241,7 @@
 end
 
 % input parsing for options and directives
-recursive = false;
+recursive = true;
 directives = doctest_default_directives();
 for i = 1:(nargin-1)
   assert(ischar(varargin{i}))
@@ -246,10 +249,18 @@
   directive = varargin{i}(2:end);
   switch directive
     case 'recursive'
+      % weakly deprecated, not mentioned in help text
       assert(strcmp(pm, '-'))
       recursive = true;
+    case 'nonrecursive'
+      assert(strcmp(pm, '-'))
+      recursive = false;
     otherwise
       assert(strcmp(pm, '+') || strcmp(pm, '-'))
+      warning('Doctest:deprecated', ...
+              ['Support for specifying directives on the command line is 
deprecated\n' ...
+               '         and will be removed in a future version (for 
discussion, see\n' ...
+               '         
https://github.com/catch22/octave-doctest/issues/127).']);
       enable = strcmp(varargin{i}(1), '+');
       directives = doctest_default_directives(directives, directive, enable);
   end
@@ -262,7 +273,7 @@
 [color_ok, color_err, color_warn, reset] = doctest_colors(fid);
 
 % print banner
-fprintf(fid, 'Doctest v0.4.1: this is Free Software without warranty, see 
source.\n\n');
+fprintf(fid, 'Doctest v0.5.0: this is Free Software without warranty, see 
source.\n\n');
 
 
 summary = struct();
@@ -275,7 +286,7 @@
 
 
 for i=1:numel(what)
-  summary = doctest_collect(what{i}, directives, summary, recursive, fid);
+  summary = doctest_collect(what{i}, directives, summary, recursive, 0, fid);
 end
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/doctest-0.4.1/inst/private/doctest_collect.m 
new/doctest-0.5.0/inst/private/doctest_collect.m
--- old/doctest-0.4.1/inst/private/doctest_collect.m    2016-01-04 
19:13:29.000000000 +0100
+++ new/doctest-0.5.0/inst/private/doctest_collect.m    2016-11-14 
07:08:14.000000000 +0100
@@ -1,4 +1,4 @@
-function summary = doctest_collect(what, directives, summary, recursive, fid)
+function summary = doctest_collect(what, directives, summary, recursive, 
depth, fid)
 % Find and run doctests.
 %
 % The parameter WHAT is the name of a class, directory, function or filename:
@@ -70,9 +70,20 @@
 
 % Deal with directories
 if (strcmp(type, 'dir'))
-  %if (~ strcmp(what, '.'))
-  %  fprintf(fid, 'Descending into directory "%s"\n', what);
-  %end
+  if (strcmp(what, '.'))
+    if (depth == 0)
+      % cheap hack to not indent when calling "doctest ."
+      depth = -1;
+    end
+  else
+    spaces = repmat(' ', 1, 2*depth);
+    if (strcmp(what(end), filesep()))
+      slashchar = '';
+    else
+      slashchar = filesep();
+    end
+    fprintf(fid, '%s%s%s\n', spaces, what, slashchar);
+  end
   oldcwd = chdir(what);
   files = dir('.');
   for i=1:numel(files)
@@ -97,7 +108,7 @@
         continue
       end
     end
-    summary = doctest_collect(f, directives, summary, recursive, fid);
+    summary = doctest_collect(f, directives, summary, recursive, depth + 1, 
fid);
   end
   chdir(oldcwd);
   return
@@ -110,21 +121,26 @@
 %   TARGETS(i).link       Hyperlink to test for use in Matlab.
 %   TARGETS(i).docstring  Associated docstring.
 %   TARGETS(i).error:     Contains error string if extraction failed.
+%   TARGETS(i).depth      How "deep" in a recursive traversal are we
 
 if strcmp(type, 'function')
-  targets = collect_targets_function(what);
+  target = collect_targets_function(what);
+  target.depth = depth;
+  targets = [target];
 elseif strcmp(type, 'class')
-  targets = collect_targets_class(what);
+  targets = collect_targets_class(what, depth);
 elseif strcmp(type, 'texinfo')
   target = struct();
   target.name = what;
   target.link = '';
+  target.depth = depth;
   [target.docstring, target.error] = parse_texinfo(fileread(what));
   targets = [target];
 else
   target = struct();
   target.name = what;
   target.link = '';
+  target.depth = depth;
   target.docstring = '';
   target.error = 'Function or class not found.';
   targets = [target];
@@ -141,7 +157,9 @@
 for i=1:numel(targets)
   % run doctests for target and update statistics
   target = targets(i);
-  fprintf(fid, '%s %s ', target.name, repmat('.', 1, 55 - numel(target.name)));
+  spaces = repmat(' ', 1, 2*target.depth);
+  dots = repmat('.', 1, 55 - numel(target.name) - 2*target.depth);
+  fprintf(fid, '%s%s %s ', spaces, target.name, dots);
 
   % extraction error?
   if target.error
@@ -210,7 +228,7 @@
 end
 
 
-function targets = collect_targets_class(what)
+function targets = collect_targets_class(what, depth)
   if (strcmp(what(1), '@'))
     % Octave methods('@foo') gives java error, Matlab just says "No methods"
     what = what(2:end);
@@ -224,6 +242,7 @@
   else
     target.link = sprintf('<a 
href="matlab:editorservices.openAndGoToLine(''%s'', 1);">%s</a>', which(what), 
what);
   end
+  target.depth = depth;
   [target.docstring, target.error] = extract_docstring(target.name);
   targets = target;
 
@@ -238,6 +257,7 @@
       target.name = sprintf('%s.%s', what, meths{i});
       target.link = sprintf('<a 
href="matlab:editorservices.openAndGoToFunction(''%s'', ''%s'');">%s</a>', 
which(what), meths{i}, target.name);
     end
+    target.depth = depth;
     [target.docstring, target.error] = extract_docstring(target.name);
     targets = [targets; target];
   end
@@ -265,7 +285,7 @@
       end
     else
       format
-      warning('Unexpected format in that file/function');
+      warning('Doctest:unexpected-format', 'Unexpected format in that 
file/function');
       error = '';
     end
   else
@@ -299,20 +319,21 @@
   % Mark the occurrence of “@example” and “@end example” to be able to find
   % example blocks after conversion from texi to plain text.  Also consider
   % indentation, so we can later correctly unindent the example's content.
+  % Note: uses “@example” instead of “$2” to avoid ARM-specific bug #130.
   str = regexprep (str, ...
-                   '^([ \t]*)(@example)(.*)$', ...
-                   [ '$1$2$3\n', ... % retain original line
+                   '^([ \t]*)(\@example)(.*)$', ...
+                   [ '$1\@example$3\n', ... % retain original line
                      '$1###### EXAMPLE START ######'], ...
                    'lineanchors', 'dotexceptnewline', 'emptymatch');
   str = regexprep (str, ...
-                   '^([ \t]*)(@end example)(.*)$', ...
+                   '^([ \t]*)(\@end example)(.*)$', ...
                    [ '$1###### EXAMPLE STOP ######\n', ...
-                     '$1$2$3'], ... % retain original line
+                     '$1\@end example$3'], ... % retain original line
                    'lineanchors', 'dotexceptnewline', 'emptymatch');
 
   % special comments "@c doctest: cmd" are translated
   % FIXME the expression would also match @@c doctest: ...
-  re = [ '(?:@c(?:omment)?\s' ... % @c or @comment, ?: means no token
+  re = [ '(?:\@c(?:omment)?\s' ... % @c or @comment, ?: means no token
             '|#|%)\s*'        ... % or one of #,%
          '(doctest:\s*.*)' ];     % want the doctest token
   str = regexprep (str, re, '% $1', 'dotexceptnewline');
@@ -321,7 +342,7 @@
   % the __makeinfo__ function exists in Octave only.
   [str, err] = eval('__makeinfo__ (str, ''plain text'')');
   if (err ~= 0)
-    error = '__makeinfo__ returned with error code'
+    error = sprintf('__makeinfo__ returned error code %d', err);
     return
   end
 
@@ -363,17 +384,30 @@
       return
     end
 
-    % split into lines
-    L = strsplit (T{i}, '\n');
-
     if (regexp (T{i}, '^\s*>>', 'once'))
       % First nonblank line starts with '>>': assume diary style.  However,
       % we strip @result and @print macros (TODO: perhaps unwisely?)
+      L = strsplit (T{i}, '\n');
       L = regexprep (L, '^(\s*)(?:⇒|=>|⊣|-\|)', '$1', 'once', 'lineanchors');
       T{i} = strjoin (L, '\n');
       continue
     end
 
+
+    % Hack: the @example block is commonly mis-used to store non-examples such 
as
+    % diagrams or math.  Delete an example block that has no indicated output.
+    % (Hard to leave for "later" as we don't keep track of @example blocks.)
+    R1 = regexp (T{i}, '^\s*(⇒|=>|⊣|-\|)', 'lineanchors');
+    R2 = regexp (T{i}, '(doctest:\s+-TEXINFO_SKIP_BLOCKS_WO_OUTPUT)');
+    T{i} = regexprep (T{i}, '(doctest:\s+-TEXINFO_SKIP_BLOCKS_WO_OUTPUT)', '');
+    if (isempty (R1) && isempty (R2))
+      T{i} = '';
+      continue
+    end
+
+    % split into lines
+    L = strsplit (T{i}, '\n');
+
     % Categorize input and output lines in the example using
     % @result and @print macros.  Everything else, including comment lines and
     % empty lines, is categorized as input (for now).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/doctest-0.4.1/inst/private/doctest_compare.m 
new/doctest-0.5.0/inst/private/doctest_compare.m
--- old/doctest-0.4.1/inst/private/doctest_compare.m    2016-01-04 
19:13:29.000000000 +0100
+++ new/doctest-0.5.0/inst/private/doctest_compare.m    2016-11-14 
07:08:14.000000000 +0100
@@ -1,10 +1,13 @@
 function match = doctest_compare(want, got, normalize_whitespace, ellipsis)
-% Matches two strings together.  They should be identical, except:
+%DOCTEST_COMPARE check if two strings match
 %
+%   Returns true if string GOT matches the template string WANT.  Basically
+%   WANT and GOT should be identical, except:
+%
+%   * whitespace at the start/end of each line is trimmed;
 %   * multiple spaces are collapsed (if NORMALIZE_WHITESPACE is true);
-%   * the first one can contain '...', which matches anything in the
-%     second (if ELLIPSIS is true);
-%   * they might match after putting "ans = " on the first;
+%   * WANT can have "..."; matches anything in GOT (if ELLIPSIS is true);
+%   * WANT can omit "ans = ";
 %   * various other nonsense of unknown current relevance.
 %
 
@@ -16,32 +19,38 @@
 % WHY do they need backspaces?  huh.
 got = regexprep(got, '.\x08', '');
 
-% collapse multiple spaces to one
-if normalize_whitespace
-    want = strtrim(regexprep(want, '\s+', ' '));
-    got = strtrim(regexprep(got, '\s+', ' '));
-else
-    want = strtrim(strtrim_lines_discard_empties(want));
-    got = strtrim(strtrim_lines_discard_empties(got));
-end
+  want = strtrim(want);
+  got = strtrim(got);
 
-if isempty(got) && (isempty(want) || (ellipsis && strcmp(want, '...')))
+  if (isempty(got) && (isempty(want) || (ellipsis && strcmp(want, '...'))))
     match = 1;
     return
-end
+  end
 
-want_re = regexptranslate('escape', want);
-if ellipsis
-  want_re = regexprep(want_re, '(\\\.){3}', '.*');
-end
+  want = regexptranslate('escape', want);
+  if normalize_whitespace
+    % collapse multiple spaces, then have each match many
+    if is_octave && compare_versions (OCTAVE_VERSION, '4.1', '<')
+      want = regexprep(want, '\s+', '\s+');
+    else
+      want = regexprep(want, '\s+', '\\s\+');
+    end
+  else
+    want = strtrim_lines_discard_empties(want);
+    got = strtrim_lines_discard_empties(got);
+  end
+
+  if ellipsis
+    want = regexprep(want, '(\\\.){3}', '.*');
+  end
 
-% allow "ans = " to be missing
-want_re = ['^(ans\s*=\s*)?' want_re '$'];
+  % allow "ans = " to be missing
+  want = ['^(ans\s*=\s*)?' want '$'];
 
 
-result = regexp(got, want_re, 'once');
+  result = regexp(got, want, 'once');
 
-match = ~ isempty(result);
+  match = ~ isempty(result);
 
 end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/doctest-0.4.1/inst/private/doctest_run.m 
new/doctest-0.5.0/inst/private/doctest_run.m
--- old/doctest-0.4.1/inst/private/doctest_run.m        2016-01-04 
19:13:29.000000000 +0100
+++ new/doctest-0.5.0/inst/private/doctest_run.m        2016-11-14 
07:08:14.000000000 +0100
@@ -48,12 +48,18 @@
   tests(i).xfail = {};
 
   % find and process directives
-  directive_matches = regexp(tests(i).source, 
'(?:#|%)\s*doctest:\s+([(\+|\-)][\w]+)(\([\w]+\))?', 'tokens');
+  re = [ ...
+    '[#%]\s*doctest:\s+' ... % e.g., "# doctest: "
+    '([\+\-]\w+)'        ... % token for cmd, e.g., "+XSKIP_IF"
+    '(\s*\('             ... % token for code, starting with "("
+      '[^#%\n]+'         ... % no newlines, no comments in code
+    '\))?'];                 % ")" of code, at most one code arg
+  directive_matches = regexp(tests(i).source, re, 'tokens');
   for j = 1:length(directive_matches)
     directive = directive_matches{j}{1};
     if (strcmp('+SKIP_IF', directive) || strcmp('+SKIP_UNLESS', directive) || 
strcmp('+XFAIL_IF', directive) || strcmp('+XFAIL_UNLESS', directive))
       if length(directive_matches{j}) == 2
-        condition = directive_matches{j}{2}(2:end - 1);
+        condition = directive_matches{j}{2};
       else
         error('doctest: syntax error, expected %s(varname)', directive);
       end
@@ -76,7 +82,7 @@
     elseif strcmp('+XFAIL_UNLESS', directive)
       tests(i).xfail{end + 1} = sprintf('~(%s)', condition);
     else
-      error('doctest: unexpected directive %s', directive);
+      warning('Doctest:unexpected-directive', 'doctest: ignoring unexpected 
directive %s', directive);
     end
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/doctest-0.4.1/octave-doctest.metainfo.xml 
new/doctest-0.5.0/octave-doctest.metainfo.xml
--- old/doctest-0.4.1/octave-doctest.metainfo.xml       2016-01-04 
19:13:29.000000000 +0100
+++ new/doctest-0.5.0/octave-doctest.metainfo.xml       2016-11-14 
07:08:14.000000000 +0100
@@ -1,11 +1,35 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright 2016 Colin B. Macdonald
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.  This file is offered as-is,
+without any warranty.
+-->
 <component type="addon">
   <id>octave-doctest</id>
   <extends>www.octave.org-octave.desktop</extends>
   <name>Doctest</name>
   <summary>Finds and tests example code within documentation</summary>
+  <description>
+    <p>Finds specially-formatted blocks of example code within
+    documentation files.  Then execute that code and confirm the
+    output is correct.  This can be useful as part of a testing
+    framework or simply to ensure that documentation stays up-to-date
+    during software development.</p>
+  </description>
+  <keywords>
+    <keyword>development</keyword>
+    <keyword>software testing</keyword>
+    <keyword>testing</keyword>
+    <keyword>documentation</keyword>
+  </keywords>
+  <translation/>
   <url type="homepage">http://octave.sourceforge.net/doctest</url>
   <url 
type="bugtracker">https://github.com/catch22/octave-doctest/issues/new</url>
-  <metadata_license>CC0-1.0</metadata_license>
+  <metadata_license>FSFAP</metadata_license>-->
   <project_license>BSD-3-Clause</project_license>
+  <developer_name>Octave-Forge Community</developer_name>
+  <update_contact>[email protected]</update_contact>
 </component>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/doctest-0.4.1/test/test_angle_brackets.m 
new/doctest-0.5.0/test/test_angle_brackets.m
--- old/doctest-0.4.1/test/test_angle_brackets.m        2016-01-04 
19:13:29.000000000 +0100
+++ new/doctest-0.5.0/test/test_angle_brackets.m        2016-11-14 
07:08:14.000000000 +0100
@@ -1,9 +1,13 @@
 function s = test_angle_brackets()
 % https://savannah.gnu.org/bugs/?45084 (Fixed in Octave 4.0)
 %
-% >> s = test_angle_brackets()
+% Fails on 3.8
+% >> oct38 = DOCTEST_OCTAVE && compare_versions(OCTAVE_VERSION, '4.0.0', '<');
+%
+%
+% >> s = test_angle_brackets()    % doctest: +XFAIL_IF(oct38)
 % s = I <3 U
-% >> s = '<p>I heart you</p>'
+% >> s = '<p>I heart you</p>'     % doctest: +XFAIL_IF(oct38)
 % s = <p>I heart you</p>
 
 s = 'I <3 U';
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/doctest-0.4.1/test/test_comments_with_directives.m 
new/doctest-0.5.0/test/test_comments_with_directives.m
--- old/doctest-0.4.1/test/test_comments_with_directives.m      1970-01-01 
01:00:00.000000000 +0100
+++ new/doctest-0.5.0/test/test_comments_with_directives.m      2016-11-14 
07:08:14.000000000 +0100
@@ -0,0 +1,11 @@
+function test_comments_with_directives()
+% >> a = 6         %doctest: +XFAIL               % comment (with 
parenthetical)
+% b = 5
+%
+%
+% >> a = 7         % doctest: +XFAIL_IF (true)    % comment
+% b = 5
+%
+%
+% >> a = 8         % doctest: +XFAIL_IF (false)   % comment (with 
parenthetical)
+% a = 8
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/doctest-0.4.1/test/test_ellipsis_match_empty.m 
new/doctest-0.5.0/test/test_ellipsis_match_empty.m
--- old/doctest-0.4.1/test/test_ellipsis_match_empty.m  1970-01-01 
01:00:00.000000000 +0100
+++ new/doctest-0.5.0/test/test_ellipsis_match_empty.m  2016-11-14 
07:08:14.000000000 +0100
@@ -0,0 +1,20 @@
+function test_ellipsis_match_empty()
+% Ellipses should match empty string:
+% >> disp('abcdef')
+% abc...def
+%
+%
+% empty at ends:
+% >> disp('def')
+% ...def
+%
+% >> disp('def')
+% def...
+%
+%
+% Empty and whitespace:
+% >> disp('abc def')
+% abc ...def
+%
+% >> disp('abc def')
+% abc... def
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/doctest-0.4.1/test/test_ellipsis_match_whitespace.m 
new/doctest-0.5.0/test/test_ellipsis_match_whitespace.m
--- old/doctest-0.4.1/test/test_ellipsis_match_whitespace.m     1970-01-01 
01:00:00.000000000 +0100
+++ new/doctest-0.5.0/test/test_ellipsis_match_whitespace.m     2016-11-14 
07:08:14.000000000 +0100
@@ -0,0 +1,36 @@
+function test_ellipsis_match_whitespace()
+% Whitespace in middle
+% >> disp('abc    def')
+% abc ... def
+% >> disp('abc  def')
+% abc ... def
+% >> disp('abc def')
+% abc...def
+%
+%
+% Should fail: expects something surrounded by whitespace
+% >> disp('abc def')   % doctest: +XFAIL
+% abc ... def
+%
+%
+% This is ok, because there are two whitespaces in input
+% >> disp('abc  def')
+% abc ... def
+%
+%
+% Currently, ellipses will match empty the string but we trim begin/end of
+% lines, so these probably fail because there is nothing to match the space
+% after/before the "...".  Probably ok to change this behaviour.
+% >> disp('    def')   % doctest: +XFAIL
+% ... def
+%
+% >> disp('def    ')   % doctest: +XFAIL
+% def ...
+%
+%
+% However, these are ok:
+% >> disp('def')
+% ...def
+%
+% >> disp('def')
+% def...
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/doctest-0.4.1/test/test_multi_directives.m 
new/doctest-0.5.0/test/test_multi_directives.m
--- old/doctest-0.4.1/test/test_multi_directives.m      1970-01-01 
01:00:00.000000000 +0100
+++ new/doctest-0.5.0/test/test_multi_directives.m      2016-11-14 
07:08:14.000000000 +0100
@@ -0,0 +1,36 @@
+function test_multi_directives()
+% Dummy:
+% >> z = 0;
+%
+%
+% Will fail if we do not skip
+% >> s = 'a   b'         % doctest: +SKIP_IF (1 > 0)  % doctest: 
-NORMALIZE_WHITESPACE
+% .. z = 1;
+% s = a b
+%
+%
+% and we did skip
+% >> z
+% z = 0
+%
+%
+%
+% Will fail if we do not skip
+% >> s = 'a   b'         % my comment  % doctest: -NORMALIZE_WHITESPACE  % 
doctest: +SKIP_IF (true)   % other comment
+% .. z = 2;
+% s = a b
+%
+%
+% and we did skip:
+% >> z
+% z = 0
+%
+%
+%
+% >> s = 'a ...23   b'   % doctest: -ELLIPSIS  % doctest: 
+NORMALIZE_WHITESPACE  % doctest: +XFAIL
+% .. z = 3;
+% s = a ... b
+%
+%
+% >> z
+% z = 3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/doctest-0.4.1/test/test_skip_wo_output.texinfo 
new/doctest-0.5.0/test/test_skip_wo_output.texinfo
--- old/doctest-0.4.1/test/test_skip_wo_output.texinfo  1970-01-01 
01:00:00.000000000 +0100
+++ new/doctest-0.5.0/test/test_skip_wo_output.texinfo  2016-11-14 
07:08:14.000000000 +0100
@@ -0,0 +1,61 @@
+In the Octave community, the @code{@@example} block is commonly used
+non-semantically.  While we do not endorse this, we do like dem ascii arts:
+@example
+       _            _            _      __ _            _
+    __| | ___   ___| |_ ___  ___| |_   / _| |___      _| |
+   / _` |/ _ \ / __| __/ _ \/ __| __| | |_| __\ \ /\ / / |
+  | (_| | (_) | (__| ||  __/\__ \ |_  |  _| |_ \ V  V /|_|
+   \__,_|\___/ \___|\__\___||___/\__| |_|  \__| \_/\_/ (_)
+
+@end example
+
+
+(for later use)
+@example
+a = 4
+  @result{} a = 4
+@end example
+
+
+Unfortunately, as there is no @strong{specified} output, this block
+is skipped too:
+@example
+a = 5;
+assert(false)
+@end example
+
+It really was skipped:
+@example
+a
+  @result{} a = 4
+@end example
+
+
+``But wait'' you say, ``I want to test a block with no output!''
+First, please patch Octave to use something like @code{@@verbatim}
+for diagrams, etc.  Then patch doctest to remove this ``feature''.
+
+Done all that?  No?  Fine, well because we like you, there is
+a secret directive for you.  It could disappear without notice
+in any future versions (we don't like you @strong{that} much).
+Try these:
+@example
+@comment doctest: -TEXINFO_SKIP_BLOCKS_WO_OUTPUT
+a = 5;
+@end example
+
+@example
+@comment doctest: +XFAIL
+@comment doctest: -TEXINFO_SKIP_BLOCKS_WO_OUTPUT
+b = 6;
+disp('do not skip me bro')
+@end example
+(note this test fails because it @strong{does} produce output).
+
+And indeed they were not skipped:
+@example
+a
+  @result{} a = 5
+b
+  @result{} b = 6
+@end example
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/doctest-0.4.1/test/test_skip_wo_output_diary.m 
new/doctest-0.5.0/test/test_skip_wo_output_diary.m
--- old/doctest-0.4.1/test/test_skip_wo_output_diary.m  1970-01-01 
01:00:00.000000000 +0100
+++ new/doctest-0.5.0/test/test_skip_wo_output_diary.m  2016-11-14 
07:08:14.000000000 +0100
@@ -0,0 +1,12 @@
+function test_skip_wo_output_diary()
+%
+% No output is specified here, so this code block would likely be
+% skipped if this was texinfo.  But its not texinfo so this test
+% is expected to fail (and its a bug if it does not).
+% >> a = 5;          % doctest: +XFAIL
+% .. disp('hi')
+%
+%
+% check that previous was not skipped
+% >> a
+% a = 5
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/doctest-0.4.1/test/test_skip_wo_output_diary.texinfo 
new/doctest-0.5.0/test/test_skip_wo_output_diary.texinfo
--- old/doctest-0.4.1/test/test_skip_wo_output_diary.texinfo    1970-01-01 
01:00:00.000000000 +0100
+++ new/doctest-0.5.0/test/test_skip_wo_output_diary.texinfo    2016-11-14 
07:08:14.000000000 +0100
@@ -0,0 +1,19 @@
+This file has diary-style within texinfo.  Potential bugs here because
+of the empty block skipping feature.  First, a block with no specified output: 
it
+should fail because it does have output:
+@example
+>> a = 5;
+>> disp('hi');     % doctest: +XFAIL
+@end example
+
+@example
+>> a
+a = 5
+@end example
+
+The first command below should not invoke skipping:
+@example
+>> x = 5;
+>> y = x + 1
+y = 6
+@end example
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/doctest-0.4.1/test/test_xfail_if_code.m 
new/doctest-0.5.0/test/test_xfail_if_code.m
--- old/doctest-0.4.1/test/test_xfail_if_code.m 1970-01-01 01:00:00.000000000 
+0100
+++ new/doctest-0.5.0/test/test_xfail_if_code.m 2016-11-14 07:08:14.000000000 
+0100
@@ -0,0 +1,25 @@
+function test_xfail_if_code()
+%
+% Initialize a dummy variable a:
+% >> a = 3
+% a = 3
+%
+%
+% The following test will fail:
+% >> a = 5     % doctest: +XFAIL_IF(6 + 0*now() >= 0)
+% b = 7
+%
+%
+% Check that it has been executed:
+% >> a
+% a = 5
+%
+%
+% This test succeeds and should not fail:
+% >> a    % doctest: +XFAIL_IF(str2num('17') > 20)
+% a = 5
+%
+%
+% There can be a space before the parenthesis
+% >> a    % doctest: +XFAIL_IF (str2num('17') > 20)
+% a = 5
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/doctest-0.4.1/test/test_xfail_if_code.texinfo 
new/doctest-0.5.0/test/test_xfail_if_code.texinfo
--- old/doctest-0.4.1/test/test_xfail_if_code.texinfo   1970-01-01 
01:00:00.000000000 +0100
+++ new/doctest-0.5.0/test/test_xfail_if_code.texinfo   2016-11-14 
07:08:14.000000000 +0100
@@ -0,0 +1,18 @@
+Dummy variable:
+@example
+a = 3
+  @result{} a = 3
+@end example
+
+The following test will fail:
+@example
+@c doctest: +XFAIL_IF(6 + 0*now () >= 0)
+a = 5
+  @result{} b = 7
+@end example
+
+value is changed (b/c xfail, not skip)
+@example
+a
+  @result{} a = 5
+@end example
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/doctest-0.4.1/test/test_xskip_if_code.texinfo 
new/doctest-0.5.0/test/test_xskip_if_code.texinfo
--- old/doctest-0.4.1/test/test_xskip_if_code.texinfo   1970-01-01 
01:00:00.000000000 +0100
+++ new/doctest-0.5.0/test/test_xskip_if_code.texinfo   2016-11-14 
07:08:14.000000000 +0100
@@ -0,0 +1,36 @@
+Dummy variable:
+@example
+a = 3
+  @result{} a = 3
+@end example
+
+The regex for SKIP_IF argument should not cross newlines!  First, note its ok
+to have syntax errors in skipped tests:
+@example
+@c doctest: +SKIP
+a = 5*(5+1))
+  @result{} b = 0
+@end example
+
+But next we have a syntax error, combined with SKIP_IF code.  The IF code
+should not glob the @code{a = } bit: might result in a syntax error if it did.
+@example
+@c doctest: +SKIP_IF(6 + 0*now () >= 0)
+a = 3*(4+1))
+  @result{} a = 15
+@end example
+
+As above, but two SKIP_IF's
+@example
+@c doctest: +SKIP_IF(6 + 0*now () >= 0)
+@c doctest: +SKIP_IF(7 + 0*now () >= 0)
+a = 3*(4+1))
+  @result{} a = 15
+@end example
+
+
+Finally, a is still 3
+@example
+a
+  @result{} a = 3
+@end example


Reply via email to