Monday, November 08, 2010 at 12:06 AM.

on tortureTest (driverName, screenName, delay = 5) {
		<<5/15/02; 11:01:37 PM by JB
			<<This is a torture testing suite, designed to make sure that what is sent via matches what is received by the server and the subsequent rpi handling script. There are two major reasons to use this script: To test the base64 encoding, and to test the encoding of the client in general. Place the "compare" script in for both of these cases.
			<<To test the base64 encoding, rename "tests.base64" to "tests" in this table and run this script with a stock table. You should not encounter any problems.
			<<To test encoding issues, which is only useful if you are developing an IM driver, you'll need to make a few changes to the rpi scripts. Go into and and comment out the base64 code, and uncomment the original code. Then, run this script. If anything goes wrong, a dialog box will pop up, and the text that should have been received and the text that was received will be placed into scratchpad.rpiTest.[testNum].received and scratchpad.rpiTest.[testNum].desired. If everything goes right, a dialog box will pop up and that happiest of messages will be displayed: "No anamolies."
			<<By my count, sending an RPC call from inside of Radio, through IM, and back into Radio goes through no fewer then *5* encoding stages:
				<< ->
				<< -> driver
				<<driver -> wire
				<<wire -> driver
				<<driver ->
			<<As of this writing (5/21/02; 11:16:34 PM by JB), both AIM and Jabber pass this test suite with no errors, with and without base64 encoding the rpc calls.
	for i = 1 to sizeOf ( ) { ( driverName, screenName, "compare", {[i], i } );
		msg ( "sending " + string ( i ) + " of " + string ( sizeOf ( ) ) );
		thread.sleepFor ( delay )}};
bundle { // testing code
	<<tortureTest ( "jabber", "", 0 )
	<<tortureTest ( "aim", "JerfBowers", 15 )
	tortureTest ( "aim", "JerfBowersTest", 10)}

This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.