TBS Plus test casesTinyButStrong version 3.2.0 for PHP 4
Installed plug-ins: 3
- plug-in [clsTbsAggregate] version ?
- plug-in [clsTbsPlugInHtml] version 1.0.5
- plug-in [clsTbsPlugInPlus] version 1.1.0
| Ope | Case | Value | Expected | Result |
|---|---|---|---|---|
| val | [test;ope=val=123] | 0 | 123 | OK |
| + | [test;ope=+=1] | 0 | 1 | OK |
| + | [test;ope=+=1,2,3,-4] | 0 | 2 | OK |
| - | [test;ope=-=1] | 0 | -1 | OK |
| - | [test;ope=-=1,2,3,-4] | 0 | -2 | OK |
| * | [test;ope=*=2] | 4 | 8 | OK |
| / | [test;ope=/=2] | 8 | 4 | OK |
| inv | [test;ope=inv=8] | 2 | 4 | OK |
| % | [test;ope=%=3] | 8 | 2 | OK |
| % | [test;ope=%] | 0.8 | 80 | OK |
| -% | [test;ope=-%] | 0.8 | 0.2 | OK |
| -% | [test;ope=-%=0.2] | 100 | 80 | OK |
| -% | [test;ope=-%=20] | 100 | 80 | OK |
| +% | [test;ope=+%=0.2] | 100 | 120 | OK |
| +% | [test;ope=+%=20] | 100 | 120 | OK |
| ^ | [test;ope=^=2] | 100 | 10000 | OK |
| ^ | [test;ope=^=0.5] | 9 | 3 | OK |
| ^ | [test;ope=^=0] | 9 | NAN | Failed Expected "NAN" Result "NAN" |
| ^ | [test;ope=^=-2] | 2 | 0.25 | OK |
| random | [test;ope=random] | 1 | 1 | OK |
| random | [test;ope=random=2] | 2 | 2 | OK |
| random | [test;ope=random=1] | 'asdf' | 1 | OK |
| random | [test;ope=random=3:3] | 12 | 3 | OK |
| sqrt | [test;ope=sqrt] | 100 | 10 | OK |
| sqrt | [test;ope=sqrt=3] | 1000 | 10 | OK |
| sqrt | [test;ope=sqrt=-3] | 8 | 0.5 | OK |
| sqrt | [test;ope=sqrt=0] | 8 | NAN | Failed Expected "NAN" Result "NAN" |
| sqrt | [test;ope=sqrt] | -4 | '2i' | OK |
| floor | [test;ope=floor] | 1.8 | 1 | OK |
| round | [test;ope=round] | 1.8 | 2 | OK |
| round | [test;ope=round] | 1.2 | 1 | OK |
| abs | [test;ope=abs] | -12 | 12 | OK |
| min | [test;ope=min=3] | 12 | 12 | OK |
| min | [test;ope=min=18] | -12 | 18 | OK |
| max | [test;ope=max=-3] | 12 | -3 | OK |
| max | [test;ope=max=18] | 12 | 12 | OK |
| range | [test;ope=range=18:12] | 10 | 12 | OK |
| range | [test;ope=range=12:18] | 15 | 15 | OK |
| range | [test;ope=range=-18:-12] | 20 | -12 | OK |
| between | [test;ope=between=123:456] | 234 | '1' | OK |
| between | [test;ope=between=123:456] | 1234 | '' | OK |
| lowercase | [test;ope=lowercase] | 'oK' | 'ok' | OK |
| uppercase | [test;ope=uppercase] | 'oK' | 'OK' | OK |
| titlecase | [test;ope=titlecase] | 'oK Ko' | 'Ok Ko' | OK |
| substr | [test;ope=substr=2] | 'history' | 'story' | OK |
| substr | [test;ope=substr=2:3] | 'enjoyment' | 'joy' | OK |
| replace | [test;ope=replace=M] | 'OMK' | 'OK' | OK |
| replace | [test;ope=replace=M:O] | 'MK' | 'OK' | OK |
| repeat | [test;ope=repeat=3] | '^v' | '^v^v^v' | OK |
| repeatstr | [test;ope=repeatstr=0] | 4 | '0000' | OK |
| prefix | [test;ope=prefix=0] | 4 | '04' | OK |
| postfix | [test;ope=postfix=0] | 4 | '40' | OK |
| prepost | [test;ope=prepost=1] | 0 | '101' | OK |
| prepost | [test;ope=prepost=(|)] | 0 | '(0)' | OK |
| plural | [test;ope=plural] | 0 | 's' | OK |
| plural | [test;ope=plural] | 1 | '' | OK |
| plural | [test;ope=plural=es] | 2 | 'es' | OK |
| plural | [test;ope=plural=es] | 1 | '' | OK |
| plural | [test;ope=plural=y|ies] | 3 | 'ies' | OK |
| plural | [test;ope=plural=y|ies] | 1 | 'y' | OK |
| plural | [test;ope=plural=none|one|many] | 11 | 'many' | OK |
| plural | [test;ope=plural=none|one|many] | 1 | 'one' | OK |
| plural | [test;ope=plural=none|one|many] | 0 | 'none' | OK |
| plural | [test;ope=plural=none|one|pair|many] | 3 | 'many' | OK |
| plural | [test;ope=plural=none|one|pair|many] | 2 | 'pair' | OK |
| plural | [test;ope=plural=none|one|pair|many] | 1 | 'one' | OK |
| plural | [test;ope=plural=none|one|pair|many] | 0 | 'none' | OK |
| size | [test;ope=size] | '12345' | 5 | OK |
| size | [test;ope=size] | array ( 0 => 1, 1 => 2, 2 => 3, ) | 3 | OK |
| explode | [test;ope=explode,size] | '1,2,3' | 3 | OK |
| explode | [test;ope=explode=|,size] | '1|2|3' | 3 | OK |
| implode | [test;ope=implode] | array ( 0 => 1, 1 => 2, 2 => 3, ) | '1,2,3' | OK |
| implode | [test;ope=implode=|] | array ( 0 => 1, 1 => 2, 2 => 3, ) | '1|2|3' | OK |
| !magnet | <b>[test;ope=!magnet=b]</b> | '!' | '' | OK |
| !magnet | <b>[test;ope=!magnet=b]</b> | '' | '<b> </b>' | OK |
| zeromagnet | <b>[test;ope=zeromagnet=b]</b> | 0 | '' | OK |
| zeromagnet | <b>[test;ope=zeromagnet=b]</b> | 1 | '<b>1</b>' | OK |
| !zeromagnet | <b>[test;ope=!zeromagnet=b]</b> | 1 | '' | OK |
| !zeromagnet | <b>[test;ope=!zeromagnet=b]</b> | 0 | '<b>0</b>' | OK |
| negativemagnet | <b>[test;ope=negativemagnet=b]</b> | 0 | '<b>0</b>' | OK |
| negativemagnet | <b>[test;ope=negativemagnet=b]</b> | -1 | '' | OK |
| !negativemagnet | <b>[test;ope=!negativemagnet=b]</b> | 1 | '' | OK |
| !negativemagnet | <b>[test;ope=!negativemagnet=b]</b> | -1 | '<b>-1</b>' | OK |
| positivemagnet | <b>[test;ope=positivemagnet=b]</b> | 0 | '<b>0</b>' | OK |
| positivemagnet | <b>[test;ope=positivemagnet=b]</b> | 1 | '' | OK |
| !positivemagnet | <b>[test;ope=!positivemagnet=b]</b> | -1 | '' | OK |
| !positivemagnet | <b>[test;ope=!positivemagnet=b]</b> | 1 | '<b>1</b>' | OK |
| emptymagnet | <b>[test;ope=emptymagnet=b]</b> | array ( ) | '' | OK |
| emptymagnet | <b>[test;ope=emptymagnet=b]</b> | true | '<b>1</b>' | OK |
| !emptymagnet | <b>[test;ope=!emptymagnet=b]</b> | true | '' | OK |
| !emptymagnet | <b>[test;ope=!emptymagnet=b]</b> | array ( ) | '<b>Array</b>' | OK |
| boolmagnet | <b>[test;ope=boolmagnet=b]</b> | false | '' | OK |
| boolmagnet | <b>[test;ope=boolmagnet=b]</b> | true | '<b> </b>' | OK |
| !boolmagnet | <b>[test;ope=!boolmagnet=b]</b> | true | '' | OK |
| !boolmagnet | <b>[test;ope=!boolmagnet=b]</b> | false | '<b> </b>' | OK |
| equalmagnet | <b>[test;ope=equalmagnet=123;magnet=b]</b> | 123 | '' | OK |
| equalmagnet | <b>[test;ope=equalmagnet=123;magnet=b]</b> | 456 | '<b>456</b>' | OK |
| !equalmagnet | <b>[test;ope=!equalmagnet=123;magnet=b]</b> | 123 | '<b>123</b>' | OK |
| !equalmagnet | <b>[test;ope=!equalmagnet=123;magnet=b]</b> | 456 | '' | OK |
| inarraymagnet | <b>[test;ope=inarraymagnet=1;magnet=b]</b> | array ( 0 => 1, 1 => 2, 2 => 3, ) | '' | OK |
| inarraymagnet | <b>[test;ope=inarraymagnet=4;magnet=b]</b> | array ( 0 => 1, 1 => 2, 2 => 3, ) | '<b>Array</b>' | OK |
| !inarraymagnet | <b>[test;ope=!inarraymagnet=1;magnet=b]</b> | array ( 0 => 1, 1 => 2, 2 => 3, ) | '<b>Array</b>' | OK |
| !inarraymagnet | <b>[test;ope=!inarraymagnet=4;magnet=b]</b> | array ( 0 => 1, 1 => 2, 2 => 3, ) | '' | OK |
| filemagnet | <b>[test;ope=filemagnet=b]</b> | 'test.php' | '<b>test.php</b>' | OK |
| filemagnet | <b>[test;ope=filemagnet=b]</b> | 123 | '' | OK |
| !filemagnet | <b>[test;ope=!filemagnet=b]</b> | 'test.php' | '' | OK |
| !filemagnet | <b>[test;ope=!filemagnet=b]</b> | 123 | '<b>123</b>' | OK |
| ! | [test;ope=!] | 1 | '' | OK |
| ! | [test;ope=!] | false | '1' | OK |
| 2bool | [test;ope=2bool] | 123 | '1' | OK |
| 2bool | [test;ope=2bool] | 'No' | '' | OK |
| _ | [test;ope=_] | '123' | ' ' | OK |
| empty2zero | [test;ope=empty2zero] | array ( ) | '0' | OK |
| empty2blank | [test;ope=empty2blank] | array ( ) | '' | OK |
| empty2space | [test;ope=empty2space] | array ( ) | ' ' | OK |
| randomfile | [test;ope=randomfile] | 'test.*p' | 'test.php' | OK |
| randomfile | [test;ope=randomfile=test.*p] | NULL | 'test.php' | OK |
| missingfile | [test;ope=missingfile=asdf.php] | 'test.php' | 'test.php' | OK |
| missingfile | [test;ope=missingfile=test.php] | 'asdf.php' | 'test.php' | OK |
| htmlchecked | [test;ope=htmlchecked] | NULL | '' | OK |
| htmlchecked | [test;ope=htmlchecked] | true | 'checked=\'checked\'' | OK |
| zebra | [test;ope=zebra=1|2|3] | NULL | '1' | OK |
| zebra | [test;ope=zebra=1|2|3] | NULL | '2' | OK |
| zebra | [test;ope=zebra=1|2|3] | NULL | '3' | OK |
| zebra | [test;ope=zebra=1|2|3] | NULL | '1' | OK |
| combined | [test; ope = + = 1, 2, 3, - = 4, 5, 6] | 100 | 91 | OK |
Before trim: 13376
After trim: 13334