comparison 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
comparison
equal deleted inserted replaced
26581:ada14ef3067f 26585:d673b506f382
5817 %! disp (pi); 5817 %! disp (pi);
5818 %! a = 1; 5818 %! a = 1;
5819 %! b = 2; 5819 %! b = 2;
5820 %!endfunction 5820 %!endfunction
5821 %!test 5821 %!test
5822 %! [s, a, b] = evalc ("__f_evalc ()"); 5822 %! [old_fmt, old_spacing] = format ();
5823 %! assert (s, "foobar 3.1416\n"); 5823 %! unwind_protect
5824 %! assert (a, 1); 5824 %! format short;
5825 %! assert (b, 2); 5825 %! [s, a, b] = evalc ("__f_evalc ()");
5826 %! assert (s, "foobar 3.1416\n");
5827 %! assert (a, 1);
5828 %! assert (b, 2);
5829 %! unwind_protect_cleanup
5830 %! format (old_fmt);
5831 %! format (old_spacing);
5832 %! end_unwind_protect
5826 5833
5827 %!error <foo> (evalc ("error ('foo')")) 5834 %!error <foo> (evalc ("error ('foo')"))
5828 %!error <bar> (evalc ("error ('foo')", "error ('bar')")) 5835 %!error <bar> (evalc ("error ('foo')", "error ('bar')"))
5829 5836
5830 %!test 5837 %!test