xref: /trunk/test/odf-validate/formula-cases.tsv (revision 0e16a31d78a652c56c5c0fc79c752f48b9048df9)
1# status<TAB>attribute<TAB>value<TAB>message substring. status: ok, or level:rule[+level:rule] (exact findings). attribute@text: outside office:spreadsheet.
2# values are the attribute text, with \n for a line feed and \u00a0 for a no-break space; the first rule's message must contain the substring.
3ok  table:formula   of:=1
4ok  table:formula   of:=1+2*3
5ok  table:formula   of:==1
6ok  table:formula   of:=-1
7ok  table:formula   of:=+1
8ok  table:formula   of:=--1
9ok  table:formula   of:=1%
10ok  table:formula   of:=1%%
11ok  table:formula   of:=2^3^2
12ok  table:formula   of:=(1+2)*3
13ok  table:formula   of:= 1 + 2
14ok  table:formula   of:=.5
15ok  table:formula   of:=1E5
16ok  table:formula   of:=1.5e-3
17ok  table:formula   of:="a""b"
18ok  table:formula   of:=""
19ok  table:formula   of:=SUM([.A1:.B2])
20ok  table:formula   of:=SUM([.A1:.B2];3)
21ok  table:formula   of:=TRUE()
22ok  table:formula   of:=IF([.A1]>1;"x";"y")
23ok  table:formula   of:=SUM(;)
24ok  table:formula   of:=SUM(1;)
25ok  table:formula   of:=SUM( )
26ok  table:formula   of:=[.A1]
27ok  table:formula   of:=[$Sheet1.A1]
28ok  table:formula   of:=[$Sheet1.$A$1]
29ok  table:formula   of:=['Sheet 1'.A1]
30ok  table:formula   of:=[$'Sheet 1'.A1:.B2]
31ok  table:formula   of:=[.A:.A]
32ok  table:formula   of:=[.1:.1]
33ok  table:formula   of:=[$Sheet1.A1:$Sheet2.B2]
34ok  table:formula   of:=[.A1:.B2]![.B1:.C3]
35ok  table:formula   of:=[.A1]~[.B1]
36ok  table:formula   of:=[.A1]:[.B2]
37ok  table:formula   of:=['file:///x.ods'#$Sheet1.A1]
38ok  table:formula   of:=[#REF!]
39ok  table:formula   of:=#N/A
40ok  table:formula   of:=#DIV/0!
41ok  table:formula   of:=#NAME?
42ok  table:formula   of:=#NULL!
43ok  table:formula   of:={1;2|3;4}
44ok  table:formula   of:={"a";"b"}
45ok  table:formula   of:=myname
46ok  table:formula   of:=$$myname
47ok  table:formula   of:=$$'my name'
48ok  table:formula   of:='Sheet1'.myname
49ok  table:formula   of:='file:///x.ods'#myname
50ok  table:formula   of:='file:///x.ods'#$'S'.name
51ok  table:formula   of:='label'
52ok  table:formula   of:='a'!!'b'
53ok  table:formula   of:=SUM('label')
54ok  table:formula   of:=ORG.OPENOFFICE.STYLE(1)
55ok  table:formula   of:=COM.MICROSOFT.X(1)
56ok  table:formula   =1+2
57ok  table:formula   1+2
58ok  table:formula   SUM([.A1])
59ok  table:formula   of:=SUM( [.A1] ; 2 )
60ok  table:formula   of:=1 +2
61ok  table:formula   of:= 1
62ok  table:formula   of:=1\n+2
63ok  table:formula   of:=[.A1]<>[.B1]
64ok  table:formula   of:=[.A1]<=[.B1]
65ok  table:formula   of:=[.A1]>=[.B1]
66ok  table:formula   of:=2*[.A1]
67ok  table:formula   of:=[.A1]&"x"
68ok  table:formula   of:=ERROR.TYPE(1)
69ok  table:formula   of:=Ünï+1
70shall:formula-syntax    table:formula   of:=    expression expected
71shall:formula-syntax    table:formula   of:=1+  expression expected
72shall:formula-syntax    table:formula   of:=*1  unexpected '*'
73shall:formula-syntax    table:formula   of:=1 2 unexpected '2'
74shall:formula-syntax    table:formula   of:=SUM(1,2)    ')' expected
75shall:formula-syntax    table:formula   of:=SUM(1;2 ')' expected
76shall:formula-syntax    table:formula   of:=SUM (1) whitespace between function name
77shall:formula-syntax    table:formula   of:=A1  cell reference
78shall:formula-syntax    table:formula   of:=TRUE    not an identifier
79shall:formula-syntax    table:formula   of:=5.  unexpected '.'
80shall:formula-syntax    table:formula   of:=1e  unexpected 'e'
81shall:formula-syntax    table:formula   of:="abc    unterminated string
82shall:formula-syntax    table:formula   of:=[.A1    without ']'
83shall:formula-syntax    table:formula   of:=[A1]    malformed reference
84shall:formula-syntax    table:formula   of:=[.a1]   malformed reference
85shall:formula-syntax    table:formula   of:=[.A0]   malformed reference
86shall:formula-syntax    table:formula   of:=[Sheet 1.A1]    malformed reference
87shall:formula-syntax    table:formula   of:=[.A1:B2]    malformed reference
88shall:formula-syntax    table:formula   of:=[$Sheet1.$#REF!$#REF!:.$#REF!$#REF!]    malformed reference
89shall:formula-syntax    table:formula   of:=#ref!   malformed error constant
90shall:formula-syntax    table:formula   of:=#REF    malformed error constant
91shall:formula-syntax    table:formula   of:={}  unexpected '}'
92shall:formula-syntax    table:formula   of:=(1  ')' expected
93shall:formula-syntax    table:formula   of:=1)  unexpected ')'
94shall:formula-syntax    table:formula   of:=[.A1];[.B1] unexpected ';'
95shall:formula-syntax    table:formula   of:=-   expression expected
96shall:formula-syntax    table:formula   of:=1 % 2   unexpected '2'
97shall:formula-syntax    table:formula   of:=$A1 '$' must be
98shall:formula-syntax    table:formula   of:='abc'.  identifier expected
99shall:formula-syntax    table:formula   of:=1\u00a0+2   unexpected
100shall:formula-syntax    table:formula   of:='a b'#myname    source: not an IRI reference
101shall:formula-syntax    table:formula   of:=a.b unexpected '.'
102shall:formula-prefix-unbound    table:formula   zz:=1   not bound
103shall:formula-namespace table:formula   oooc:=1 bound to <http://openoffice.org/2004/calc>
104should:formula-foreign-namespace    table:formula@text  oooc:=1 bound to <http://openoffice.org/2004/calc>
105ok  table:formula@text  of:=1+1
106should:formula-function-unprefixed  table:formula   of:=FOO(1)  not a function of Part 2
107should:formula-function-case    table:formula   of:=sum(1)  upper case
108should:formula-array-ragged table:formula   of:={1;2|3} rows have 2/1 columns
109ok  table:expression    [.A1]
110ok  table:expression    of:=[.A1]
111ok  table:expression    =[.A1]
112ok  table:expression    [$Sheet1.$A$1:.$B$2]~[$Sheet1.$D$1:.$E$2]
113shall:formula-syntax    table:expression    of:[.A1]    must start with '='
114shall:formula-syntax    table:expression    [.A1];[.B1] unexpected ';'
115ok  text:formula    of:=1+1
116ok  text:formula    Table+1
117should:formula-foreign-namespace    text:formula    ooow:Table+1    bound to <http://openoffice.org/2004/writer>
118shall:formula-syntax    text:formula    of:=1+  expression expected
119ok  style:condition value()>=0
120ok  style:condition value()=1
121ok  style:condition value()!=true
122ok  style:condition value()<-1.5
123ok  style:condition footnote()
124ok  style:condition endnote()
125ok  style:condition header()
126ok  style:condition footer()
127ok  style:condition section()
128ok  style:condition table()
129ok  style:condition table-header()
130ok  style:condition list-level()=2
131ok  style:condition outline-level()=1
132ok  style:condition cell-content()>5
133ok  style:condition cell-content()="a"
134ok  style:condition cell-content()>[.A1]
135ok  style:condition cell-content-is-between(1,2)
136ok  style:condition cell-content-is-not-between([.A1],[.B1])
137ok  style:condition cell-content-is-between("a,b","c")
138ok  style:condition is-true-formula([.A1]>1)
139ok  style:condition of:is-true-formula(SUM([.A1];2)>1)
140ok  style:condition is-true-formula(IF(1;2;3))
141ok  style:condition cell-content() >= 5
142ok  style:condition cell-content-is-between( 1 , 2 )
143shall:formula-syntax    style:condition value() relational operator expected
144shall:formula-syntax    style:condition value()>    number, true or false expected
145shall:formula-syntax    style:condition list-level()=0  positive integer expected
146shall:formula-syntax    style:condition list-level()=x  positive integer expected
147shall:formula-syntax    style:condition footnote    '(' expected
148shall:formula-syntax    style:condition cell-content()<>5   unexpected '>'
149shall:formula-syntax    style:condition cell-content-is-between(1;2)    ',' expected
150shall:formula-syntax    style:condition cell-content-is-between(1)  ',' expected
151shall:formula-syntax    style:condition bogus() unknown condition 'bogus'
152shall:formula-syntax    style:condition footnote() and header() unexpected 'a'
153shall:formula-syntax    style:condition is-true-formula()   unexpected ')'
154shall:formula-syntax    style:condition cell-content()>5)   unexpected ')'
155ok  table:condition of:cell-content-text-length()<0
156ok  table:condition cell-content-text-length()>=5
157ok  table:condition cell-content-text-length-is-between(1,5)
158ok  table:condition cell-content-text-length-is-not-between(1,5)
159ok  table:condition cell-content-is-in-list("a";"b")
160ok  table:condition cell-content-is-in-list("a")
161ok  table:condition cell-content-is-in-list([.A1:.A5])
162ok  table:condition cell-content-is-whole-number() and cell-content-is-between(1,5)
163ok  table:condition cell-content-is-decimal-number() and cell-content()>=1.5
164ok  table:condition cell-content-is-date() and is-true-formula([.A1]>0)
165ok  table:condition cell-content-is-time() and cell-content-is-not-between(1,2)
166ok  table:condition is-true-formula([.A1]>0)
167shall:formula-syntax    table:condition cell-content()>5    unknown condition 'cell-content'
168shall:formula-syntax    table:condition cell-content-is-whole-number()  'and' expected
169shall:formula-syntax    table:condition cell-content-is-whole-number() and footnote()   value condition expected
170shall:formula-syntax    table:condition cell-content-is-in-list()   unexpected ')'
171shall:formula-syntax    table:condition  and cell-content()>1   unknown condition 'and'
172shall:formula-syntax    table:condition cell-content-text-length()  relational operator expected
173