Sequential Argument Processing in Script Tables
concatenateThreeArgs(String first, String second, String third) returns the concatenated arguments, separated by a spaceAffixing a semi-colon ";" to the end of a cell's contents should invoke sequential argument processing. Mixing every-other-cell and sequential-cell processing within the same row is permitted.
| script | fitnesse.slim.test.TestSlim | |||
| concatenate three args; | 1 | 2.0 | three | |
| concatenate | a | three args; | b | c |
| concatenate three | x | args; | why | zee |
Results of the function call should be equal regardless of processing style.
| script | ||||||
| $RESULT_WITH_EVERY_OTHER_CELL_PROCESSING= | concatenate | a | three | b | args | c |
| $RESULT_WITH_SEQUENTIAL_CELL_PROCESSING= | concatenate three args; | a | b | c | ||
| $RESULT_WITH_MIXED_PROCESSING= | concatenate | a | three args; | b | c | |
| check | echo string | $RESULT_WITH_SEQUENTIAL_CELL_PROCESSING | $RESULT_WITH_EVERY_OTHER_CELL_PROCESSING | |||
| check | echo string | $RESULT_WITH_MIXED_PROCESSING | $RESULT_WITH_EVERY_OTHER_CELL_PROCESSING | |||
Script Table Keywords
| script | |||||
| check | concatenate three args; | 1 | 2.0 | three | 1 2.0 three |
| check not | concatenate three args; | a | b | c | something else |
| show | concatenate three args; | a | b | c | |
Sequential argument processing can be used in scenario tables
| scenario | concatenate | input1 | and | input2 | and | input3 |
| $RESULT= | concatenate three args; | @input1 | @input2 | @input3 | ||
| script | |||||
| concatenate | a | and | b | and | c |
| check | echo string | $RESULT | a b c | ||
| concatenate | input1 | and | input2 | and | input3 |
| input1 | input2 | input3 | |||
| x | y | z | |||
| script | |||
| check | echo string | $RESULT | x y z |
Script name's character case should be identical to scenario name's character case.
| scenario | conCatentate _ _ _ | input1,input2,input3 | ||
| $RESULT= | concatenate three args; | @input1 | @input2 | @input3 |
| script | |||
| conCatentate a b c | |||
| check | echo string | $RESULT | a b c |
| conCatentate; | a | b | c |
| check | echo string | $RESULT | a b c |
| scenario | con | input1 | cAt | input2 | enate | input3 |
| $RESULT= | concatenate three args; | @input1 | @input2 | @input3 | ||
| ConCAtEnate; | input1 | input2 | input3 |
| input1 | input2 | input3 | |
| x | y | z | |
| check | echo string | $RESULT | x y z |
| Con | input1 | CAt | input2 | Enate | input3 |
| input1 | input2 | input3 | |||
| x | y | z | |||
| check | echo string | $RESULT | x y z | ||