@@ -744,6 +744,56 @@ class ConvertTests
744744 Yunit.assert(converted = expected)
745745 }
746746
747+ StringUpper ()
748+ {
749+ input_script := "
750+ (LTrim Join `r`n %
751+ var = Chris Mallet
752+ StringUpper , newvar, var
753+ )"
754+
755+ expected := "
756+ (LTrim Join `r`n %
757+ var := " Chris Mallet"
758+ StrUpper, newvar, %var%
759+ )"
760+
761+ ; MsgBox, Click OK and the following script will be run with AHK v2:`n`n%expected%
762+ ; result := ExecScript(expected)
763+ ; MsgBox, End of running script with AHK v2
764+ ; msgbox, expected:`n`n%expected%
765+ converted := Convert(input_script)
766+ ; msgbox, converted:`n`n%converted%
767+ Yunit.assert(converted = expected)
768+ }
769+
770+ StringLower ()
771+ {
772+ input_script := "
773+ (LTrim Join `r`n %
774+ var = chris mallet
775+ StringLower , newvar, var, T
776+ if (newvar == " Chris Mallet" )
777+ MsgBox , it worked
778+ )"
779+
780+ expected := "
781+ (LTrim Join `r`n %
782+ var := " chris mallet"
783+ StrLower, newvar, %var%, T
784+ if (newvar == " Chris Mallet" )
785+ MsgBox , it worked
786+ )"
787+
788+ ; MsgBox, Click OK and the following script will be run with AHK v2:`n`n%expected%
789+ ; result := ExecScript(expected)
790+ ; MsgBox, End of running script with AHK v2
791+ ; msgbox, expected:`n`n%expected%
792+ converted := Convert(input_script)
793+ ; msgbox, converted:`n`n%converted%
794+ Yunit.assert(converted = expected)
795+ }
796+
747797 End ()
748798 {
749799 }
0 commit comments