Mercurial > hg > octave-lyh
annotate test/line-continue.tst @ 17492:4f1d827e1302
doc: Add to documentation for gca, gcf.
* scripts/plot/gca.m, scripts/plot/gcf.m: Add to documentation.
author | Rik <rik@octave.org> |
---|---|
date | Wed, 25 Sep 2013 08:53:34 -0700 |
parents | 8be8a65d3ca8 |
children |
rev | line source |
---|---|
14138
72c96de7a403
maint: update copyright notices for 2012
John W. Eaton <jwe@octave.org>
parents:
14132
diff
changeset
|
1 ## Copyright (C) 2006-2012 John W. Eaton |
7016 | 2 ## |
3 ## This file is part of Octave. | |
4 ## | |
5 ## Octave is free software; you can redistribute it and/or modify it | |
6 ## under the terms of the GNU General Public License as published by | |
7 ## the Free Software Foundation; either version 3 of the License, or (at | |
8 ## your option) any later version. | |
9 ## | |
10 ## Octave is distributed in the hope that it will be useful, but | |
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 ## General Public License for more details. | |
14 ## | |
15 ## You should have received a copy of the GNU General Public License | |
16 ## along with Octave; see the file COPYING. If not, see | |
17 ## <http://www.gnu.org/licenses/>. | |
18 | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
19 %!shared x, a, b |
5590 | 20 %! x = [1,2]; |
21 %! a = 1; | |
22 %! b = 2; | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
23 |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
24 %!test |
5590 | 25 %! y = [a... # comments here ok |
26 %! b]; | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
27 %! assert (y, x); |
5590 | 28 |
29 %!test | |
30 %! x = [1;2]; | |
31 %! y = [a... # comments here ok | |
32 %! ;\ | |
16215
6fe6ac8bbfdb
test: Remove trailing spaces from ends of lines in test/ directory.
Rik <rik@octave.org>
parents:
16030
diff
changeset
|
33 %! |
5590 | 34 %! b]; |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
35 %! assert (y, x); |
5590 | 36 |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
37 %!assert (1 + ... |
5590 | 38 %! 2 - \# comments here ok |
39 %! 3 / ... # comments here ok | |
40 %! -1,6); | |
41 | |
42 %!function y = f (a,... | |
43 %! b, ... | |
44 %! c, ... % comments ok | |
45 %! x, # continuation characters not required in parens | |
46 %! y, \# but they should work too. | |
47 %! z) | |
48 %! | |
49 %! y = 1; | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
50 %!endfunction |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
51 %! |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
52 %!assert (f (), 1) |
5590 | 53 |
54 %!test | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
55 %!assert (1 == 1 |
5590 | 56 %! && 2 == 2 |
57 %! || 3 == 5); | |
58 | |
59 %!test | |
60 %! x = [1, ... | |
16215
6fe6ac8bbfdb
test: Remove trailing spaces from ends of lines in test/ directory.
Rik <rik@octave.org>
parents:
16030
diff
changeset
|
61 %! |
5590 | 62 %! ... |
16215
6fe6ac8bbfdb
test: Remove trailing spaces from ends of lines in test/ directory.
Rik <rik@octave.org>
parents:
16030
diff
changeset
|
63 %! |
5590 | 64 %! 2]; |
65 %! y = [1;2]; | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
66 %! assert (y, x); |
5590 | 67 |
68 %!test | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
69 %! x = [1 ,... |
5590 | 70 %! 2]; |
71 %! y = [1,2]; | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
72 %! assert (y, x); |
5590 | 73 |
74 %!test | |
75 %! x = [ 1 , ... | |
76 %! 2]; | |
77 %! y = [1,2]; | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
78 %! assert (y, x); |
5590 | 79 |
17254
8be8a65d3ca8
Ignore anything after the continuation marker '...' (bug #38653)
Stefan Mahr <dac922@gmx.de>
parents:
16937
diff
changeset
|
80 %!test |
8be8a65d3ca8
Ignore anything after the continuation marker '...' (bug #38653)
Stefan Mahr <dac922@gmx.de>
parents:
16937
diff
changeset
|
81 %! x = [ 1 , ...anything after the ... is ignored |
8be8a65d3ca8
Ignore anything after the continuation marker '...' (bug #38653)
Stefan Mahr <dac922@gmx.de>
parents:
16937
diff
changeset
|
82 %! 2]; |
8be8a65d3ca8
Ignore anything after the continuation marker '...' (bug #38653)
Stefan Mahr <dac922@gmx.de>
parents:
16937
diff
changeset
|
83 %! y = [1,2]; |
8be8a65d3ca8
Ignore anything after the continuation marker '...' (bug #38653)
Stefan Mahr <dac922@gmx.de>
parents:
16937
diff
changeset
|
84 %! assert (y, x); |