Template:Str mid/testcases


 * Str mid/core
 * Str mid/sandbox

Regular

 * abc;1;26: Abcdefghijklmnopqrstuvwxyz
 * abc;10;5: jklmn
 * abc;10;;:
 * abc;;6;: Abcdef
 * abc;6;200: fghijklmnopqrstuvwxyz
 * abc;6;200: fghijklmnopqrstuvwxyz

Use param 4 (index j) not sublength

 * abc;10;15:
 * abc;10;
 * abc;;6:

blank params

 * blank string
 * ;5:
 * ;;5:
 * ;;;5:
 * ;6;7;8:
 * ;6;7;8:


 * blank for numbers
 * abc:
 * abc;:
 * abc;;:
 * abc;;;:


 * abc;2=:
 * abc;2=;3=:
 * abc;2=;3=;4=:


 * abc;;3=:
 * abc;;;4=:
 * abc;2=;;4=:

i < 0

 * abc;-10;:
 * abc;-10;7: pqrstuv

i < 0, using j

 * abc;-10;;20:
 * abc;-10;;-7:
 * abc;-10;;-10:
 * abc;-10;;7:

sublen<0

 * abc;2=5;3=-3:
 * abc;2=7;3=-3:
 * abc;;3=-3;j=10:
 * abc;;3=3;j=10:
 * abc;2=7;3=-3:
 * abc;;3=-3: TODO apply logic: from the end
 * abc;;3=-10;4=30: (check this: j=30 or j=26?)

Zeros

 * abc;0:
 * abc;5;0:
 * abc;5;;0:
 * abc;0;0;0:


 * abc;2=;:
 * abc;2=5;3=0:
 * abc;2=5;j=0:

Input errors

 * abc;2=2;3=3;7:
 * abc;;2=foo;
 * abc;3=foo;
 * abc;2=foo;3=bar;

Index errors

 * Triangular calculation check:
 * abc;6;7;8:
 * abc;6;7;8: fghijkl
 * ;6;1;8:


 * other
 * abc;0:
 * abc;3;0:
 * abc;0;;15:
 * abc;10;;7:
 * abc;-5;26: uvwxyz
 * abc;-1;5: yz

Error message suppression

 * abc;0;10; ignore errors=false:
 * abc;0;10; ignore errors=true:


 * abc;0;5: ignore errors=false; ignore errors=false:
 * abc;0;5:ignore errors=true: