Testcase for jQuery Ticket 7615

crafted to make sure the custom trim is assigned before jQuery runs

by jitter

HTML

<script type="text/javascript">
String.prototype.trim = function() {
    var b = 0,
        e = this.length - 1;
    while (this.substr(b, 1) == " ") b++;
    while (this.substr(e, 1) == " ") e--;
    alert('custom trim used');
    return this.substring(b, e + 1);
}
</script>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.4.js"></script>

JavaScript

$(function() {
    var s = new String(" Hello ");
    s = s.trim();
    alert("!" + s + "!");
});