annotate test/bug-38576.tst @ 20614:10ec79b47808

use new string_value method to handle value extraction errors * __voronoi__.cc, chol.cc, colamd.cc, fftw.cc: Use new string_value method.
author John W. Eaton <jwe@octave.org>
date Thu, 08 Oct 2015 18:15:56 -0400
parents 730bc06134f9
children
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
17913
730bc06134f9 test: Don't run bug-38576.tst on Windows systems where ls does not exist.
Rik <rik@octave.org>
parents: 16360
diff changeset
13 %!test
730bc06134f9 test: Don't run bug-38576.tst on Windows systems where ls does not exist.
Rik <rik@octave.org>
parents: 16360
diff changeset
14 %! ## Windows systems can't run "ls -1"
730bc06134f9 test: Don't run bug-38576.tst on Windows systems where ls does not exist.
Rik <rik@octave.org>
parents: 16360
diff changeset
15 %! if (! ispc ())
730bc06134f9 test: Don't run bug-38576.tst on Windows systems where ls does not exist.
Rik <rik@octave.org>
parents: 16360
diff changeset
16 %! assert (f1 (), 0);
730bc06134f9 test: Don't run bug-38576.tst on Windows systems where ls does not exist.
Rik <rik@octave.org>
parents: 16360
diff changeset
17 %! assert (f2 (), 0);
730bc06134f9 test: Don't run bug-38576.tst on Windows systems where ls does not exist.
Rik <rik@octave.org>
parents: 16360
diff changeset
18 %! assert (ischar (f3 ()), true);
730bc06134f9 test: Don't run bug-38576.tst on Windows systems where ls does not exist.
Rik <rik@octave.org>
parents: 16360
diff changeset
19 %! assert (f3 (1), 0);
730bc06134f9 test: Don't run bug-38576.tst on Windows systems where ls does not exist.
Rik <rik@octave.org>
parents: 16360
diff changeset
20 %! endif