blob: 5c4a2ce1eee3405b430892b77ca6ad8c0a504416 [file] [log] [blame]
This test checks String.trim(), String.trimLeft() and String.trimRight() methods.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS whitespace[0].s.trim() is ''
PASS whitespace[0].s.trimLeft() is ''
PASS whitespace[0].s.trimRight() is ''
PASS whitespace[1].s.trim() is ''
PASS whitespace[1].s.trimLeft() is ''
PASS whitespace[1].s.trimRight() is ''
PASS whitespace[2].s.trim() is ''
PASS whitespace[2].s.trimLeft() is ''
PASS whitespace[2].s.trimRight() is ''
PASS whitespace[3].s.trim() is ''
PASS whitespace[3].s.trimLeft() is ''
PASS whitespace[3].s.trimRight() is ''
PASS whitespace[4].s.trim() is ''
PASS whitespace[4].s.trimLeft() is ''
PASS whitespace[4].s.trimRight() is ''
PASS whitespace[5].s.trim() is ''
PASS whitespace[5].s.trimLeft() is ''
PASS whitespace[5].s.trimRight() is ''
PASS whitespace[6].s.trim() is ''
PASS whitespace[6].s.trimLeft() is ''
PASS whitespace[6].s.trimRight() is ''
PASS whitespace[7].s.trim() is ''
PASS whitespace[7].s.trimLeft() is ''
PASS whitespace[7].s.trimRight() is ''
PASS whitespace[8].s.trim() is ''
PASS whitespace[8].s.trimLeft() is ''
PASS whitespace[8].s.trimRight() is ''
PASS whitespace[9].s.trim() is ''
PASS whitespace[9].s.trimLeft() is ''
PASS whitespace[9].s.trimRight() is ''
PASS whitespace[10].s.trim() is ''
PASS whitespace[10].s.trimLeft() is ''
PASS whitespace[10].s.trimRight() is ''
PASS whitespace[11].s.trim() is ''
PASS whitespace[11].s.trimLeft() is ''
PASS whitespace[11].s.trimRight() is ''
PASS whitespace[12].s.trim() is ''
PASS whitespace[12].s.trimLeft() is ''
PASS whitespace[12].s.trimRight() is ''
PASS whitespace[13].s.trim() is ''
PASS whitespace[13].s.trimLeft() is ''
PASS whitespace[13].s.trimRight() is ''
PASS whitespace[14].s.trim() is ''
PASS whitespace[14].s.trimLeft() is ''
PASS whitespace[14].s.trimRight() is ''
PASS whitespace[15].s.trim() is ''
PASS whitespace[15].s.trimLeft() is ''
PASS whitespace[15].s.trimRight() is ''
PASS whitespace[16].s.trim() is ''
PASS whitespace[16].s.trimLeft() is ''
PASS whitespace[16].s.trimRight() is ''
PASS whitespace[17].s.trim() is ''
PASS whitespace[17].s.trimLeft() is ''
PASS whitespace[17].s.trimRight() is ''
PASS whitespace[18].s.trim() is ''
PASS whitespace[18].s.trimLeft() is ''
PASS whitespace[18].s.trimRight() is ''
PASS whitespace[19].s.trim() is ''
PASS whitespace[19].s.trimLeft() is ''
PASS whitespace[19].s.trimRight() is ''
PASS whitespace[20].s.trim() is ''
PASS whitespace[20].s.trimLeft() is ''
PASS whitespace[20].s.trimRight() is ''
PASS whitespace[21].s.trim() is ''
PASS whitespace[21].s.trimLeft() is ''
PASS whitespace[21].s.trimRight() is ''
PASS wsString.trim() is ''
PASS wsString.trimLeft() is ''
PASS wsString.trimRight() is ''
PASS trimString.trim() is testString
PASS trimString.trimLeft() is leftTrimString
PASS trimString.trimRight() is rightTrimString
PASS leftTrimString.trim() is testString
PASS leftTrimString.trimLeft() is leftTrimString
PASS leftTrimString.trimRight() is testString
PASS rightTrimString.trim() is testString
PASS rightTrimString.trimLeft() is testString
PASS rightTrimString.trimRight() is rightTrimString
PASS trim.call(0) is '0'
PASS trimLeft.call(0) is '0'
PASS trimRight.call(0) is '0'
PASS trim.call(Infinity) is 'Infinity'
PASS trimLeft.call(Infinity) is 'Infinity'
PASS trimRight.call(Infinity) is 'Infinity'
PASS trim.call(NaN) is 'NaN'
PASS trimLeft.call(NaN) is 'NaN'
PASS trimRight.call(NaN) is 'NaN'
PASS trim.call(true) is 'true'
PASS trimLeft.call(true) is 'true'
PASS trimRight.call(true) is 'true'
PASS trim.call(false) is 'false'
PASS trimLeft.call(false) is 'false'
PASS trimRight.call(false) is 'false'
PASS trim.call(({})) is '[object Object]'
PASS trimLeft.call(({})) is '[object Object]'
PASS trimRight.call(({})) is '[object Object]'
PASS trim.call(({toString:function(){return 'wibble'}})) is 'wibble'
PASS trimLeft.call(({toString:function(){return 'wibble'}})) is 'wibble'
PASS trimRight.call(({toString:function(){return 'wibble'}})) is 'wibble'
PASS trim.call(['an','array']) is 'an,array'
PASS trimLeft.call(['an','array']) is 'an,array'
PASS trimRight.call(['an','array']) is 'an,array'
PASS successfullyParsed is true
TEST COMPLETE