[SilkTest] 打印功能和打印中加号引号的运用
上一篇 / 下一篇 2011-01-19 09:38:13 / 个人分类:SilkTest
[-] testcase PrintingInformation() appstate none
[ ] print()
[ ] print("PERSONAL")
[ ] print("- - - - - -")
[ ] print("Name: Andrew Curley")
[ ] print("Address: 37 Lincolm Street")
[ ] print(" Marlboro, MA. 01752")
[ ] print("Telephone: (508)485-2239")
[ ] print()
[ ] print("Family")
[ ] print("- - - - -")
[ ] print("Wife's Name: Roberta")
[ ] print("Children's names: Adnrea and Thomas")
[ ] print()
[ ] print()
[ ] print("Business")
[ ] print("Employer: Segue Software")
[ ] print("Position: SilkTest Development Manager")
[ ] print("Manager's Name: Mary Brown")
[ ] print()
输出:
[-] Testcase PrintingInformation - Passed
[ ]
[ ] PERSONAL
[ ] - - - - - -
[ ] Name: Andrew Curley
[ ] Address: 37 Lincolm Street
[ ] Marlboro, MA. 01752
[ ] Telephone: (508)485-2239
[ ]
[ ] Family
[ ] - - - - -
[ ] Wife's Name: Roberta
[ ] Children's names: Adnrea and Thomas
[ ]
[ ]
[ ] Business
[ ] Employer: Segue Software
[ ] Position: SilkTest Development Manager
[ ] Manager's Name: Mary Brown
让我们看看其中加号已经引号的功能吧:
[-] testcase concatentation() appstate none
[ ] String sLongSentence="This sentences is broken"+" Into two strings"
[ ] Print(sLongSentence)
[ ] String sCaptain="Skipper"
[ ] String sFirstMate="Gilligan"
[ ] String sShipmates=sCaptain+"and"+sFirstMate
[ ] Print()
[ ] Print("The (sShipmates) were marooned on Gilligan's Island")
[ ] Print("The "+sShipmates+" were marooned on Gilligan's Island")
[ ]
[ ] String sFirstName="John"
[ ] String sMiddleInitial="Q"
[ ] String sLastName="Public"
[ ] String sFullName=sFirstName+' '+sMiddleInitial+'. '+sLastName
[ ] Print()
[ ] Print("(sFullName)")
[ ] Print(sFullName)
[ ]
[ ] string sFirst="Smokey"
[ ] string sMiddle='the'
[ ] string sLast="Bear"
[ ] string sFull=sFirst+' '+sMiddle+' '+sLast
[ ] print()
[ ] print(sFull)
输出结果:
[-] Testcase concatentation - Passed
[ ] This sentences is broken Into two strings
[ ]
[ ] The (sShipmates) were marooned on Gilligan's Island
[ ] The SkipperandGilligan were marooned on Gilligan's Island
[ ]
[ ] (sFullName)
[ ] John Q. Public
[ ]
[ ] Smokey the Bear
[ ] print()
[ ] print("PERSONAL")
[ ] print("- - - - - -")
[ ] print("Name: Andrew Curley")
[ ] print("Address: 37 Lincolm Street")
[ ] print(" Marlboro, MA. 01752")
[ ] print("Telephone: (508)485-2239")
[ ] print()
[ ] print("Family")
[ ] print("- - - - -")
[ ] print("Wife's Name: Roberta")
[ ] print("Children's names: Adnrea and Thomas")
[ ] print()
[ ] print()
[ ] print("Business")
[ ] print("Employer: Segue Software")
[ ] print("Position: SilkTest Development Manager")
[ ] print("Manager's Name: Mary Brown")
[ ] print()
输出:
[-] Testcase PrintingInformation - Passed
[ ]
[ ] PERSONAL
[ ] - - - - - -
[ ] Name: Andrew Curley
[ ] Address: 37 Lincolm Street
[ ] Marlboro, MA. 01752
[ ] Telephone: (508)485-2239
[ ]
[ ] Family
[ ] - - - - -
[ ] Wife's Name: Roberta
[ ] Children's names: Adnrea and Thomas
[ ]
[ ]
[ ] Business
[ ] Employer: Segue Software
[ ] Position: SilkTest Development Manager
[ ] Manager's Name: Mary Brown
让我们看看其中加号已经引号的功能吧:
[-] testcase concatentation() appstate none
[ ] String sLongSentence="This sentences is broken"+" Into two strings"
[ ] Print(sLongSentence)
[ ] String sCaptain="Skipper"
[ ] String sFirstMate="Gilligan"
[ ] String sShipmates=sCaptain+"and"+sFirstMate
[ ] Print()
[ ] Print("The (sShipmates) were marooned on Gilligan's Island")
[ ] Print("The "+sShipmates+" were marooned on Gilligan's Island")
[ ]
[ ] String sFirstName="John"
[ ] String sMiddleInitial="Q"
[ ] String sLastName="Public"
[ ] String sFullName=sFirstName+' '+sMiddleInitial+'. '+sLastName
[ ] Print()
[ ] Print("(sFullName)")
[ ] Print(sFullName)
[ ]
[ ] string sFirst="Smokey"
[ ] string sMiddle='the'
[ ] string sLast="Bear"
[ ] string sFull=sFirst+' '+sMiddle+' '+sLast
[ ] print()
[ ] print(sFull)
输出结果:
[-] Testcase concatentation - Passed
[ ] This sentences is broken Into two strings
[ ]
[ ] The (sShipmates) were marooned on Gilligan's Island
[ ] The SkipperandGilligan were marooned on Gilligan's Island
[ ]
[ ] (sFullName)
[ ] John Q. Public
[ ]
[ ] Smokey the Bear
TAG: