:unittest.toUpper

Test cases for the :toUpper function

Description: call:unittest.toUpper
Dependencies: :toUpper, :Format
Script:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
:unittest.toUpper
:$created 20080219 :$changed 20091130
:$source https://www.dostips.com
for %%C in (
        "CONVERT this to upper case"
        "123Conver tHIs to Upper case"
        "Convert this TO upper case123"
        "CONVERT THIS TO UPPER CASE"
        "convert this to upper case"
        ""
    ) do (
    set "s=%%~C"
    call:toUpper s
    call:Format "[35] [35]." "'%%~C'" "'%%s%%'"
)
EXIT /b
Script Output:
 DOS Script Output
---- :unittest.toUpper - output
'CONVERT this to upper case'        'CONVERT THIS TO UPPER CASE'       .
'123Conver tHIs to Upper case'      '123CONVER THIS TO UPPER CASE'     .
'Convert this TO upper case123'     'CONVERT THIS TO UPPER CASE123'    .
'CONVERT THIS TO UPPER CASE'        'CONVERT THIS TO UPPER CASE'       .
'convert this to upper case'        'CONVERT THIS TO UPPER CASE'       .
''                                  ''                                 .
----