Mercurial > octave
diff libinterp/parse-tree/oct-parse.yy @ 26585:d673b506f382 stable
test: use "format short" in tests depending on output format (bug #55539)
* pr-output.cc: Apply "format short" on evalc tests assuming short output
display format, restore original output format.
* oct-parse.yy: Likewise.
author | Mike Miller <mtmiller@octave.org> |
---|---|
date | Mon, 21 Jan 2019 13:27:28 -0800 |
parents | 6e698f4606db |
children | a7d56e0a5c8c 2310164737b3 |
line wrap: on
line diff
--- a/libinterp/parse-tree/oct-parse.yy Sat Jan 19 18:22:48 2019 +0100 +++ b/libinterp/parse-tree/oct-parse.yy Mon Jan 21 13:27:28 2019 -0800 @@ -5819,10 +5819,17 @@ %! b = 2; %!endfunction %!test -%! [s, a, b] = evalc ("__f_evalc ()"); -%! assert (s, "foobar 3.1416\n"); -%! assert (a, 1); -%! assert (b, 2); +%! [old_fmt, old_spacing] = format (); +%! unwind_protect +%! format short; +%! [s, a, b] = evalc ("__f_evalc ()"); +%! assert (s, "foobar 3.1416\n"); +%! assert (a, 1); +%! assert (b, 2); +%! unwind_protect_cleanup +%! format (old_fmt); +%! format (old_spacing); +%! end_unwind_protect %!error <foo> (evalc ("error ('foo')")) %!error <bar> (evalc ("error ('foo')", "error ('bar')"))