Difference: SpreadSheetPluginTestCases (5 vs. 6)

Revision 62019-07-25 - TamasBalazs

Line: 1 to 1
 

SpreadSheetPlugin Testing

Use this topic to verify proper operation of the SpreadSheetPlugin in your environment.

For developers: This topic is included by TestCaseAutoSpreadSheetPlugin for automated integration testing. This requires the TWiki:Plugins.TestFixturePlugin and a repository checkout.

CALC{} and CALCULATE{}

Expected

<-- expected CALC_and_CALCULATE -->
  • CALC{$REPLACE(1234, 2, 1, X)}=|1X34|
  • CALCULATE{$REPLACE(1234, 2, 1, X)}=|1X34|
<-- /expected -->

Actual

<-- actual -->
  • CALC{$REPLACE(1234, 2, 1, X)}=|1X34|
  • CALCULATE{$REPLACE(1234, 2, 1, X)}=|1X34|
<-- /actual -->

NOTE: All functions that follow are tested via:

  • CALC{} if reference is done to table cells
  • CALCULATE{} otherwise

Function ABOVE

Expected

<-- expected ABOVE -->
A1 B1
A2 B2
$ABOVE()=R0:C1..R2:C1 $ABOVE()=R0:C2..R2:C2
<-- /expected -->

Actual

<-- actual -->
A1 B1
A2 B2
$ABOVE()=R0:C1..R2:C1 $ABOVE()=R0:C2..R2:C2
<-- /actual -->

Function ABS

Expected

<-- expected ABS -->
  • $ABS(-2)=|2|
  • $ABS(-0.5)=|0.5|
  • $ABS(0)=|0|
  • $ABS(0.5)=|0.5|
  • $ABS(2)=|2|
<-- /expected -->

Actual

<-- actual -->
  • $ABS(-2)=|2|
  • $ABS(-0.5)=|0.5|
  • $ABS(0)=|0|
  • $ABS(0.5)=|0.5|
  • $ABS(2)=|2|
<-- /actual -->

Function ADDLIST

Expected

<-- expected ADDLIST -->
  • $SETLIST(test)=||
  • $ADDLIST(test, 1, 2)=||
  • $GETLIST(test)=|1, 2|
  • $ADDLIST(test, 3, 4)=||
  • $GETLIST(test)=|1, 2, 3, 4|
  • $ADDLIST(novalue)=||
  • $GETLIST(novalue)=||
  • $ADDLIST()=||
<-- /expected -->

Actual

<-- actual -->
  • $SETLIST(test)=||
  • $ADDLIST(test, 1, 2)=||
  • $GETLIST(test)=|1, 2|
  • $ADDLIST(test, 3, 4)=||
  • $GETLIST(test)=|1, 2, 3, 4|
  • $ADDLIST(novalue)=||
  • $GETLIST(novalue)=||
  • $ADDLIST()=||
<-- /actual -->

Function AND

Expected

<-- expected AND -->
  • $AND()=|0|
  • $AND(0)=|0|
  • $AND(1)=|1|
  • $AND(0, 0)=|0|
  • $AND(0, 1)=|0|
  • $AND(1, 0)=|0|
  • $AND(1, 1)=|1|
  • $AND(0, 1, 2, 3)=|0|
  • $AND(1, 2, 3, 4)=|1|
<-- /expected -->

Actual

<-- actual -->
  • $AND()=|0|
  • $AND(0)=|0|
  • $AND(1)=|1|
  • $AND(0, 0)=|0|
  • $AND(0, 1)=|0|
  • $AND(1, 0)=|0|
  • $AND(1, 1)=|1|
  • $AND(0, 1, 2, 3)=|0|
  • $AND(1, 2, 3, 4)=|1|
<-- /actual -->

Function AVERAGE

Expected

<-- expected AVERAGE -->
  • $AVERAGE()=|0|
  • $AVERAGE(x)=|0|
  • $AVERAGE(0)=|0|
  • $AVERAGE(0, 1)=|0.5|
  • $AVERAGE(0, 1, 2)=|1|
  • $AVERAGE(1.5, 2, 2.5)=|2|
  • $AVERAGE(-1.5, 2, 2.5)=|1|
<-- /expected -->

Actual

<-- actual -->
  • $AVERAGE()=|0|
  • $AVERAGE(x)=|0|
  • $AVERAGE(0)=|0|
  • $AVERAGE(0, 1)=|0.5|
  • $AVERAGE(0, 1, 2)=|1|
  • $AVERAGE(1.5, 2, 2.5)=|2|
  • $AVERAGE(-1.5, 2, 2.5)=|1|
<-- /actual -->

Function BIN2DEC

Expected

<-- expected BIN2DEC  -->
  • $BIN2DEC(1100100)=|100|
  • $BIN2DEC(1010101010101010101)=|349525|
  • $BIN2DEC()=|0|
<-- /expected -->

Actual

<-- actual -->
  • $BIN2DEC(1100100)=|100|
  • $BIN2DEC(1010101010101010101)=|349525|
  • $BIN2DEC()=|0|
<-- /actual -->

Function BITXOR

Expected

<-- expected BITXOR -->
  • $BITXOR()=||
  • $BITXOR(A123)=||
  • $BITXOR($BITXOR(anything))=|anything|
<-- /expected -->

Actual

<-- actual -->
  • $BITXOR()=||
  • $BITXOR(A123)=||
  • $BITXOR($BITXOR(anything))=|anything|
<-- /actual -->

Function CEILING

Expected

<-- expected CEILING -->
  • $CEILING(5.4)=|6|
  • $CEILING(-5.4)=|-5|
<-- /expected -->

Actual

<-- actual -->
  • $CEILING(5.4)=|6|
  • $CEILING(-5.4)=|-5|
<-- /actual -->

Function CHAR

Expected

<-- expected CHAR -->
  • $CHAR(97)=|a|
<-- /expected -->

Actual

<-- actual -->
  • $CHAR(97)=|a|
<-- /actual -->

Function CODE

Expected

<-- expected CODE -->
  • $CODE(abc)=|97|
<-- /expected -->

Actual

<-- actual -->
  • $CODE(abc)=|97|
<-- /actual -->

Function COLUMN

Expected

<-- expected COLUMN -->
$COLUMN()=1 $COLUMN()=2
$COLUMN()=1 $COLUMN()=2
$COLUMN()=1 $COLUMN()=2
<-- /expected -->

Actual

<-- actual -->
$COLUMN()=1 $COLUMN()=2
$COLUMN()=1 $COLUMN()=2
$COLUMN()=1 $COLUMN()=2
<-- /actual -->

Function COUNTITEMS

Expected

<-- expected COUNTITEMS -->
  • $COUNTITEMS(One)=|One: 1|
  • $COUNTITEMS(One, Two)=|One: 1
    Two: 1|
  • $COUNTITEMS(One, Two, One)=|One: 2
    Two: 1|
<-- /expected -->

Actual

<-- actual -->
  • $COUNTITEMS(One)=|One: 1|
  • $COUNTITEMS(One, Two)=|One: 1
    Two: 1|
  • $COUNTITEMS(One, Two, One)=|One: 2
    Two: 1|
<-- /actual -->

Function COUNTSTR

Expected

<-- expected COUNTSTR -->
  • $COUNTSTR(Done, , Done, OK, )=|3|
  • $COUNTSTR(Done, , Done, OK, Done)=|2|
<-- /expected -->

Actual

<-- actual -->
  • $COUNTSTR(Done, , Done, OK, )=|3|
  • $COUNTSTR(Done, , Done, OK, Done)=|2|
<-- /actual -->

Function DEC2BIN

Expected

<-- expected DEC2BIN  -->
  • $DEC2BIN(9)=|1001|
  • $DEC2BIN(9, 6)=|001001|
  • $DEC2BIN()=|0|
<-- /expected -->

Actual

<-- actual -->
  • $DEC2BIN(9)=|1001|
  • $DEC2BIN(9, 6)=|001001|
  • $DEC2BIN()=|0|
<-- /actual -->

Function DEC2HEX

Expected

<-- expected DEC2HEX  -->
  • $DEC2HEX(165)=|A5|
  • $DEC2HEX(100, 4)=|0064|
  • $DEC2HEX()=|0|
<-- /expected -->

Actual

<-- actual -->
  • $DEC2HEX(165)=|A5|
  • $DEC2HEX(100, 4)=|0064|
  • $DEC2HEX()=|0|
<-- /actual -->

Function DEC2OCT

Expected

<-- expected DEC2OCT  -->
  • $DEC2OCT(58)=|72|
  • $DEC2OCT(58, 3)=|072|
  • $DEC2OCT()=|0|
<-- /expected -->

Actual

<-- actual -->
  • $DEC2OCT(58)=|72|
  • $DEC2OCT(58, 3)=|072|
  • $DEC2OCT()=|0|
<-- /actual -->

Function DEF

Expected

<-- expected DEF -->
  • $DEF(One, Two, Three)=|One|
  • $DEF(, Two, Three)=|Two|
  • $DEF(, , Three)=|Three|
  • $DEF(, , )=||
<-- /expected -->

Actual

<-- actual -->
  • $DEF(One, Two, Three)=|One|
  • $DEF(, Two, Three)=|Two|
  • $DEF(, , Three)=|Three|
  • $DEF(, , )=||
<-- /actual -->

Function EMPTY

Expected

<-- expected EMPTY -->
  • $EMPTY()=|1|
  • $EMPTY( )=|0|
  • $EMPTY(foo)=|0|
<-- /expected -->

Actual

<-- actual -->
  • $EMPTY()=|1|
  • $EMPTY( )=|0|
  • $EMPTY(foo)=|0|
<-- /actual -->

Function EQUAL

Expected

<-- expected EQUAL -->
  • $EQUAL(foo, foo)=|1|
  • $EQUAL(foo, Foo)=|1|
  • $EQUAL(foo, bar)=|0|
<-- /expected -->

Actual

<-- actual -->
  • $EQUAL(foo, foo)=|1|
  • $EQUAL(foo, Foo)=|1|
  • $EQUAL(foo, bar)=|0|
<-- /actual -->

Function EVAL

Expected

<-- expected EVAL -->
  • $EVAL( (5 * 3) / 2 + 1.1 )=|8.6|
<-- /expected -->

Actual

<-- actual -->
  • $EVAL( (5 * 3) / 2 + 1.1 )=|8.6|
<-- /actual -->

Function EVEN

Expected

<-- expected EVEN -->
  • $EVEN()=|1|
  • $EVEN(-1)=|0|
  • $EVEN(0)=|1|
  • $EVEN(1)=|0|
  • $EVEN(2)=|1|
  • $EVEN(3.4)=|0|
  • $EVEN(4.4)=|1|
  • $EVEN(4.6)=|1|
<-- /expected -->

Actual

<-- actual -->
  • $EVEN()=|1|
  • $EVEN(-1)=|0|
  • $EVEN(0)=|1|
  • $EVEN(1)=|0|
  • $EVEN(2)=|1|
  • $EVEN(3.4)=|0|
  • $EVEN(4.4)=|1|
  • $EVEN(4.6)=|1|
<-- /actual -->

Function EXACT

Expected

<-- expected EXACT -->
  • $EXACT(foo, Foo)=|0|
  • $EXACT(foo, $LOWER(Foo))=|1|
<-- /expected -->

Actual

<-- actual -->
  • $EXACT(foo, Foo)=|0|
  • $EXACT(foo, $LOWER(Foo))=|1|
<-- /actual -->

Function EXEC

Expected

<-- expected EXEC -->
  • $SET(msg, $NOEXEC(Hi $GET(name)))=||
  • $EXEC($SET(name, Tom) $EXEC($GET(msg)))=| Hi Tom|
  • $EXEC($SET(name, Jerry) $EXEC($GET(msg)))=| Hi Jerry|
<-- /expected -->

Actual

<-- actual -->
  • $SET(msg, $NOEXEC(Hi $GET(name)))=||
  • $EXEC($SET(name, Tom) $EXEC($GET(msg)))=| Hi Tom|
  • $EXEC($SET(name, Jerry) $EXEC($GET(msg)))=| Hi Jerry|
<-- /actual -->

Function EXISTS

Expected

<-- expected EXISTS -->
  • $EXISTS(WebHome)=|1|
  • $EXISTS(ThisDoesNotExist)=|0|
<-- /expected -->

Actual

<-- actual -->
  • $EXISTS(WebHome)=|1|
  • $EXISTS(ThisDoesNotExist)=|0|
<-- /actual -->

Function EXP

Expected

<-- expected EXP -->
  • $EXP(1)=|2.71828182845905|
<-- /expected -->

Actual

<-- actual -->
  • $EXP(1)=|2.71828182845905|
<-- /actual -->

Function FILTER

Expected

<-- expected FILTER -->
  • $FILTER(f, fluffy)=|luy|
  • $FILTER(an Franc, San Francisco)=|Sisco|
  • $FILTER($sp, Cat and Mouse)=|CatandMouse|
  • $FILTER([^0-9], Project-ID-1234)=|1234|
  • $FILTER([^a-zA-Z0-9 ], Stupid mistake*%@^! Fixed)=|Stupid mistake Fixed|
<-- /expected -->

Actual

<-- actual -->
  • $FILTER(f, fluffy)=|luy|
  • $FILTER(an Franc, San Francisco)=|Sisco|
  • $FILTER($sp, Cat and Mouse)=|CatandMouse|
  • $FILTER([^0-9], Project-ID-1234)=|1234|
  • $FILTER([^a-zA-Z0-9 ], Stupid mistake*%@^! Fixed)=|Stupid mistake Fixed|
<-- /actual -->

Function FIND

Expected

<-- expected FIND -->
  • $FIND(f, fluffy)=|1|
  • $FIND(f, fluffy, 2)=|4|
  • $FIND(x, fluffy, 1)=|0|
<-- /expected -->

Actual

<-- actual -->
  • $FIND(f, fluffy)=|1|
  • $FIND(f, fluffy, 2)=|4|
  • $FIND(x, fluffy, 1)=|0|
<-- /actual -->

Function FLOOR

Expected

<-- expected FLOOR -->
  • $FLOOR(5.4)=|5|
  • $FLOOR(-5.4)=|-6|
<-- /expected -->

Actual

<-- actual -->
  • $FLOOR(5.4)=|5|
  • $FLOOR(-5.4)=|-6|
<-- /actual -->

Function FORMAT

Expected

<-- expected FORMAT -->
  • $FORMAT(COMMA, 2, 12345.6789)=|12,345.68|
  • $FORMAT(DOLLAR, 2, 12345.6789)=|$12,345.68|
  • $FORMAT(KB, 2, 1234567)=|1205.63 KB|
  • $FORMAT(MB, 2, 1234567)=|1.18 MB|
  • $FORMAT(KBMB, 2, 1234567)=|1.18 MB|
  • $FORMAT(KBMB, 2, 1234567890)=|1.15 GB|
  • $FORMAT(NUMBER, 1, 12345.67)=|12345.7|
  • $FORMAT(PERCENT, 1, 0.1234567)=|12.3%|
<-- /expected -->

Actual

<-- actual -->
  • $FORMAT(COMMA, 2, 12345.6789)=|12,345.68|
  • $FORMAT(DOLLAR, 2, 12345.6789)=|$12,345.68|
  • $FORMAT(KB, 2, 1234567)=|1205.63 KB|
  • $FORMAT(MB, 2, 1234567)=|1.18 MB|
  • $FORMAT(KBMB, 2, 1234567)=|1.18 MB|
  • $FORMAT(KBMB, 2, 1234567890)=|1.15 GB|
  • $FORMAT(NUMBER, 1, 12345.67)=|12345.7|
  • $FORMAT(PERCENT, 1, 0.1234567)=|12.3%|
<-- /actual -->

Function FORMATGMTIME

Expected

<-- expected FORMATGMTIME -->
  • $FORMATGMTIME(1041379200, $day $mon $year)=|01 Jan 2003|
<-- /expected -->

Actual

<-- actual -->
  • $FORMATGMTIME(1041379200, $day $mon $year)=|01 Jan 2003|
<-- /actual -->

Function FORMATTIME

Expected

<-- expected FORMATTIME -->
  • $FORMATTIME(0, $year/$month/$day GMT)=|1970/01/01 GMT|
<-- /expected -->

Actual

<-- actual -->
  • $FORMATTIME(0, $year/$month/$day GMT)=|1970/01/01 GMT|
<-- /actual -->

Function FORMATTIMEDIFF

Expected

<-- expected FORMATTIMEDIFF -->
  • $FORMATTIMEDIFF(min, 1, 200)=|3 hours|
  • $FORMATTIMEDIFF(min, 2, 200)=|3 hours and 20 minutes|
  • $FORMATTIMEDIFF(min, 1, 1640)=|1 day|
  • $FORMATTIMEDIFF(min, 2, 1640)=|1 day and 3 hours|
  • $FORMATTIMEDIFF(min, 3, 1640)=|1 day, 3 hours and 20 minutes|
<-- /expected -->

Actual

<-- actual -->
  • $FORMATTIMEDIFF(min, 1, 200)=|3 hours|
  • $FORMATTIMEDIFF(min, 2, 200)=|3 hours and 20 minutes|
  • $FORMATTIMEDIFF(min, 1, 1640)=|1 day|
  • $FORMATTIMEDIFF(min, 2, 1640)=|1 day and 3 hours|
  • $FORMATTIMEDIFF(min, 3, 1640)=|1 day, 3 hours and 20 minutes|
<-- /actual -->

Function GET

Expected

<-- expected GET -->
  • $SET(test, 1234)=||
  • $GET(test)=|1234|
  • $GET()=||
<-- /expected -->

Actual

<-- actual -->
  • $SET(test, 1234)=||
  • $GET(test)=|1234|
  • $GET()=||
<-- /actual -->

Function GETHASH

Expected

<-- expected GETHASH -->
  • $SETHASH()=||
  • $SETHASH(age, Jane, 26)=||
  • $SETHASH(age, Tim, 27)=||
  • $SETHASH(sex, Jane, F)=||
  • $SETHASH(sex, Tim, M)=||
  • $GETHASH(age, Jane)=|26|
  • $SETHASH(age, Jane)=||
  • $GETHASH(age, Jane)=||
  • $GETHASH(sex)=|Jane, Tim|
  • $GETHASH(foo, bar)=||
  • $GETHASH(foo)=||
  • $GETHASH()=|age, sex|
<-- /expected -->

Actual

<-- actual -->
  • $SETHASH()=||
  • $SETHASH(age, Jane, 26)=||
  • $SETHASH(age, Tim, 27)=||
  • $SETHASH(sex, Jane, F)=||
  • $SETHASH(sex, Tim, M)=||
  • $GETHASH(age, Jane)=|26|
  • $SETHASH(age, Jane)=||
  • $GETHASH(age, Jane)=||
  • $GETHASH(sex)=|Jane, Tim|
  • $GETHASH(foo, bar)=||
  • $GETHASH(foo)=||
  • $GETHASH()=|age, sex|
<-- /actual -->

Function GETLIST

Expected

<-- expected GETLIST -->
  • $SETLIST(test, 1, 2, 3, 4)=||
  • $GETLIST(test)=|1, 2, 3, 4|
  • $GETLIST()=||
<-- /expected -->

Actual

<-- actual -->
  • $SETLIST(test, 1, 2, 3, 4)=||
  • $GETLIST(test)=|1, 2, 3, 4|
  • $GETLIST()=||
<-- /actual -->

Function HASH2LIST

Expected

<-- expected HASH2LIST  -->
  • $SETHASH()=||
  • $LIST2HASH(age, Jane, 26, Tim, 27)=||
  • $HASH2LIST(age)=|Jane, 26, Tim, 27|
  • $HASH2LIST(age, $key is $value)=|Jane is 26, Tim is 27|
  • $HASH2LIST(age, $key)=|Jane, Tim|
  • $HASH2LIST(age, $value)=|26, 27|
<-- /expected -->

Actual

<-- actual -->
  • $SETHASH()=||
  • $LIST2HASH(age, Jane, 26, Tim, 27)=||
  • $HASH2LIST(age)=|Jane, 26, Tim, 27|
  • $HASH2LIST(age, $key is $value)=|Jane is 26, Tim is 27|
  • $HASH2LIST(age, $key)=|Jane, Tim|
  • $HASH2LIST(age, $value)=|26, 27|
<-- /actual -->

Function HASHCOPY

Expected

<-- expected HASHCOPY -->
  • $SETHASH()=||
  • $LIST2HASH(age, Jane, 26, Tim, 27, Sam, 27)=||
  • $HASHCOPY(age, new)=||
  • $SETHASH(age, Old, 95)=||
  • $SETHASH(new, New, 1)=||
  • $HASH2LIST(age, $key: $value)=|Jane: 26, Old: 95, Sam: 27, Tim: 27|
  • $HASH2LIST(new, $key: $value)=|Jane: 26, New: 1, Sam: 27, Tim: 27|
  • $HASHCOPY(age)=||
  • $HASHCOPY()=||
<-- /expected -->

Actual

<-- actual -->
  • $SETHASH()=||
  • $LIST2HASH(age, Jane, 26, Tim, 27, Sam, 27)=||
  • $HASHCOPY(age, new)=||
  • $SETHASH(age, Old, 95)=||
  • $SETHASH(new, New, 1)=||
  • $HASH2LIST(age, $key: $value)=|Jane: 26, Old: 95, Sam: 27, Tim: 27|
  • $HASH2LIST(new, $key: $value)=|Jane: 26, New: 1, Sam: 27, Tim: 27|
  • $HASHCOPY(age)=||
  • $HASHCOPY()=||
<-- /actual -->

Function HASHEACH

Expected

<-- expected HASHEACH -->
  • $SETHASH()=||
  • $LIST2HASH(age, Jane, 26, Tim, 27)=||
  • $HASHEACH($key is $INT($value * 2 + $index), age)=||
  • $HASH2LIST(age, $key: $value)=|Jane: Jane is 53, Tim: Tim is 56|
<-- /expected -->

Actual

<-- actual -->
  • $SETHASH()=||
  • $LIST2HASH(age, Jane, 26, Tim, 27)=||
  • $HASHEACH($key is $INT($value * 2 + $index), age)=||
  • $HASH2LIST(age, $key: $value)=|Jane: Jane is 53, Tim: Tim is 56|
<-- /actual -->

Function HASHEXISTS

Expected

<-- expected HASHEXISTS -->
  • $SETHASH()=||
  • $LIST2HASH(age, Jane, 26, Tim, 27)=||
  • $HASHEXISTS(age)=|1|
  • $HASHEXISTS(age, Jane)=|1|
  • $HASHEXISTS(age, Blake)=|0|
  • $HASHEXISTS(height)=|0|
  • $HASHEXISTS()=|0|
<-- /expected -->
 
This site is powered by the TWiki collaboration platform Powered by Perl This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.SpreadSheetPluginTestCases