// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
//
// Author: John Leach
// Contact: john.leach@syger.it

/*
 Tests the Extensions.js code.
*/

// Create a short cut to the normal output device
if (!syger.exists(this, "puts")) {
	var puts = function (str) {
		document.write(str);
	};
}

var obj = new String(" string object ");
puts(syger.introspect("string object", obj) + "\n\n");

obj = " string object ";
puts("obj returns '" + obj + "'\n\n");

puts("trim() returns '" + obj.trim() + "'\n\n");

puts("startsWith(' str') returns " + obj.startsWith(' str') + "\n");
puts("startsWith('str') returns " + obj.startsWith('str') + "\n");
puts("startsWith(' string object longer ') returns " + obj.startsWith(' string object longer ') + "\n\n");

puts("endsWith('ect ') returns " + obj.endsWith('ect ') + "\n");
puts("endsWith('ect') returns " + obj.endsWith('ect') + "\n");
puts("endsWith(' string object longer ') returns " + obj.endsWith(' string object longer ') + "\n\n");

obj = typeof "string literal";
puts("obj returns '" + obj + "'\n\n");
puts("startsWith('str') returns " + obj.startsWith('str') + "\n");
puts("endsWith('ing') returns " + obj.endsWith('ing'));
