:unittest.lTrim

Test cases for the :lTrim function

Description: call:unittest.lTrim
Dependencies: :lTrim, :Format
Script:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
:unittest.lTrim
:$created 20080227 :$changed 20080227
:$source https://www.dostips.com
for %%C in (
        "left trim nothing "
        " left trim one "
        "                left trim plenty "
    ) do (
    set "s=%%~C"
    call:lTrim s
    call:Format "[35] [35]." "'%%~C'" "'%%s%%'"
)
EXIT /b
Script Output:
 DOS Script Output
---- :unittest.lTrim - output
'left trim nothing '                'left trim nothing '               .
' left trim one '                   'left trim one '                   .
'                left trim plenty ' 'left trim plenty '                .
----