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