check number of calls Checks that the number of calls is one in order to confirm that a function was only called once. test name number of calls test name number of calls 1 test create Tests the "create text with" block with varying number of inputs. no text create single Hello Hello create single number -1 -1 create double text K 9 K9 create double text numbers 4 2 42 create triple 1 2 3 123 create order 1 TRUE 0 M 10M get empty Creates an empty string for use with the empty test. test empty Tests the "is empty" block". FALSE not empty Google TRUE empty TRUE empty complex TRUE empty order TRUE test length Tests the "length" block. zero length 0 non-zero length Google 6 length order TRUE car 3 test append Tests the "append text" block with different types of parameters. item Miserable item Failure append text item MiserableFailure item 12 item 34 append number item 1234 item Something item TRUE Positive append order item Something Positive test find simple Tests the "find" block with a variable. text Banana find first simple FIRST text an 1 find last simple LAST text an 3 find none simple FIRST text Peel -1 get fruit Creates a string for use with the find test. number of calls 1 Banana test find complex Tests the "find" block with a function call. number of calls 0 find first complex FIRST an 1 find first complex number of calls 0 find first order complex FIRST TRUE an 1 find first order complex number of calls 0 find last complex LAST an 3 find last complex number of calls 0 find last order complex LAST TRUE an 3 find last order complex number of calls 0 find none complex FIRST Peel -1 find none complex number of calls 0 find none order complex FIRST TRUE Peel -1 find none order complex test get simple Tests the "get letter" block with a variable. text Blockly get first simple FIRST text B get last simple LAST text y TRUE get random simple GT FIRST text RANDOM text -1 get # simple FROM_START text 2 o get # order simple FROM_START text TRUE 2 o get #-end simple FROM_END text 2 k get #-end order simple FROM_END The order for index for #-end is addition because this will catch errors in generators where most perform the operation ... - index. text ADD 0 2 k get Blockly Creates a string for use with the get test. number of calls 1 Blockly test get complex Tests the "get letter" block with a function call. text Blockly number of calls 0 get first complex FIRST B get first complex number of calls 0 get first order complex FIRST TRUE B get first order complex number of calls 0 get last complex LAST y get last complex number of calls 0 get last order complex LAST TRUE y get last order complex number of calls 0 TRUE get random complex GT FIRST text RANDOM -1 get random complex number of calls 0 TRUE get random order complex GT FIRST text RANDOM TRUE -1 get random order complex number of calls 0 get # complex FROM_START 2 o get # complex number of calls 0 get # order complex FROM_START TRUE TRUE 2 o get # order complex number of calls 0 get #-end complex FROM_END 2 k get #-end complex number of calls 0 get #-end order complex FROM_END The order for index for #-end is addition because this will catch errors in generators where most perform the operation ... - index. TRUE ADD 0 2 k get #-end order complex get numbers Creates a string for use with the substring test. number of calls 1 123456789 test substring simple Tests the "get substring" block with a variable. text 123456789 substring # simple FROM_START FROM_START text 1 2 23 substring # simple order FROM_START FROM_START text TRUE 1 TRUE 2 23 substring #-end simple FROM_END FROM_END text 2 1 78 substring #-end simple order FROM_END FROM_END The order for index for #-end is addition because this will catch errors in generators where most perform the operation ... - index. text ADD 0 2 ADD 0 1 78 substring first-last simple FIRST LAST text text substring # #-end simple FROM_START FROM_END text 1 1 2345678 substring #-end # simple FROM_END FROM_START text 6 3 34 substring first # simple FIRST FROM_START text 3 1234 substring first #-end simple FIRST FROM_END text 1 12345678 substring # last simple FROM_START LAST text 6 789 substring #-end last simple FROM_END LAST text 2 789 substring all with # #-end simple FROM_START FROM_END text 0 0 123456789 substring all with #-end # simple FROM_END FROM_START text 8 8 123456789 substring all with # #-end math simple FROM_START FROM_END Checks that the whole string is properly retrieved even if the value for start and end is not a simple number. This is especially important in generators where substring uses [x:length - y] for # #-end. text ADD 0 0 ADD 0 0 123456789 test substring complex Tests the "get substring" block with a function call. number of calls 0 substring # complex FROM_START FROM_START 1 2 23 substring # complex number of calls 0 substring # complex order FROM_START FROM_START TRUE TRUE 1 TRUE 2 23 substring # complex order number of calls 0 substring #-end complex FROM_END FROM_END The order for index for #-end is addition because this will catch errors in generators where most perform the operation ... - index. 2 1 78 substring #-end complex number of calls 0 substring #-end order order FROM_END FROM_END TRUE ADD 0 2 ADD 0 1 78 substring #-end order order number of calls 0 substring first-last FIRST LAST text substring first-last number of calls 0 substring # #-end complex FROM_START FROM_END 1 1 2345678 substring # #-end complex number of calls 0 substring #-end # complex FROM_END FROM_START 6 3 34 substring #-end # complex number of calls 0 substring first # complex FIRST FROM_START 3 1234 substring first # complex number of calls 0 substring first #-end complex FIRST FROM_END 1 12345678 substring first #-end complex number of calls 0 substring # last complex FROM_START LAST 6 789 substring # last complex number of calls 0 substring #-end last complex FROM_END LAST 2 789 substring #-end last complex number of calls 0 substring all with # #-end complex FROM_START FROM_END 0 0 123456789 substring all with # #-end complex number of calls 0 substring all with #-end # complex FROM_END FROM_START 8 8 123456789 substring all with #-end # complex number of calls 0 substring all with # #-end math complex FROM_START FROM_END Checks that the whole string is properly retrieved even if the value for start and end is not a simple number. This is especially important in generators where substring uses [x:length - y] for # #-end. ADD 0 0 ADD 0 0 123456789 substring all with # #-end math complex test case Tests the "change casing" block. text Hello World uppercase UPPERCASE text HELLO WORLD uppercase order UPPERCASE TRUE text HELLO WORLD text Hello World lowercase LOWERCASE text hello world lowercase order LOWERCASE TRUE text hello world text heLLo WorlD titlecase TITLECASE text Hello World titlecase order TITLECASE TRUE text Hello World test trim Tests the "trim" block. text abc def trim both BOTH text abc def trim both order BOTH TRUE text abc def trim left LEFT text abc def trim left order LEFT TRUE text abc def trim right RIGHT text abc def trim right order RIGHT TRUE text abc def