Mercurial > octave
changeset 28188:ad33d23d264f
maint:merge stable to default.
author | Rik <rik@octave.org> |
---|---|
date | Sun, 05 Apr 2020 14:56:29 -0700 |
parents | 493d46a02edc (current diff) 3faa700d64d4 (diff) |
children | 500937ff19d9 |
files | scripts/pkg/private/configure_make.m |
diffstat | 2 files changed, 28 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/miscellaneous/inputParser.m Sun Mar 29 12:59:33 2020 -0700 +++ b/scripts/miscellaneous/inputParser.m Sun Apr 05 14:56:29 2020 -0700 @@ -531,15 +531,20 @@ endfunction function r = is_argname (this, type, name) - if (this.CaseSensitive) - r = isfield (this.(type), name); - this.last_name = name; - else - fnames = this.([type "Names"]); - l = strcmpi (name, fnames); - r = any (l(:)); - if (r) - this.last_name = fnames{l}; + r = ischar (name) && isrow (name); + if (r) + if (this.CaseSensitive) + r = isfield (this.(type), name); + if (r) + this.last_name = name; + endif + else + fnames = this.([type "Names"]); + l = strcmpi (name, fnames); + r = any (l(:)); + if (r) + this.last_name = fnames{l}; + endif endif endif endfunction @@ -830,3 +835,12 @@ %! p = inputParser; %! p.addParameter ("a", [], @ischar); %! p.parse ("a", 1); + +%!test <*58112> +%! p = inputParser (); +%! p.addRequired ("first"); +%! p.addOptional ("second", []); +%! p.parse (1, {"test", 1, 2, 3}); +%! r = p.Results; +%! assert (r.first, 1); +%! assert (r.second, {"test", 1, 2, 3});
--- a/scripts/pkg/private/configure_make.m Sun Mar 29 12:59:33 2020 -0700 +++ b/scripts/pkg/private/configure_make.m Sun Apr 05 14:56:29 2020 -0700 @@ -65,6 +65,11 @@ "OCTAVE"; octave_binary}; scenv = sprintf ("%s='%s' ", cenv{:}); + if (verbose) + ## Add standard V=1 make argument for verbose build rules + scenv = [scenv, "V=1"]; + endif + ## Configure. if (exist (fullfile (src, "configure"), "file")) flags = "";