annotate test/bug-38576.tst @ 17692:38cf56b77274

Overhaul image, imagesc to use newplot and support low-level invocation form. * scripts/image/image.m: New variable do_new indicates high-level calling form. For high-level invocation, call newplot before __img__. Correct linearity check if vectors are reversed (high-to-low values). Only apply image properties to axes if doing a high-level invocation. * scripts/image/imagesc.m: New variable do_new indicates high-level calling form. Delete subfunction __imagesc__ and incorporate minimal amount of code into imagesc. Only apply climits for high-level invocation.
author Rik <rik@octave.org>
date Fri, 18 Oct 2013 16:27:44 -0700
parents 11115c237231
children 730bc06134f9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
16360
11115c237231 recognize variables when parsing (bug #38576)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
1 %!function r = f1 ()
11115c237231 recognize variables when parsing (bug #38576)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
2 %! ls = svd (1);
11115c237231 recognize variables when parsing (bug #38576)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
3 %! r = eval ("ls -1;");
11115c237231 recognize variables when parsing (bug #38576)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
4 %!endfunction
11115c237231 recognize variables when parsing (bug #38576)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
5 %!function r = f2 ()
11115c237231 recognize variables when parsing (bug #38576)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
6 %! [u,ls,v] = svd (1);
11115c237231 recognize variables when parsing (bug #38576)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
7 %! r = eval ("ls -1;");
11115c237231 recognize variables when parsing (bug #38576)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
8 %!endfunction
11115c237231 recognize variables when parsing (bug #38576)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
9 %!function r = f3 (ls)
11115c237231 recognize variables when parsing (bug #38576)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
10 %! r = eval ("ls -1;");
11115c237231 recognize variables when parsing (bug #38576)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
11 %!endfunction
11115c237231 recognize variables when parsing (bug #38576)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
12
11115c237231 recognize variables when parsing (bug #38576)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
13 %!assert (f1 (), 0);
11115c237231 recognize variables when parsing (bug #38576)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
14 %!assert (f2 (), 0);
11115c237231 recognize variables when parsing (bug #38576)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
15 %!assert (ischar (f3 ()), true);
11115c237231 recognize variables when parsing (bug #38576)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
16 %!assert (f3 (1), 0);