summaryrefslogtreecommitdiff
path: root/js/src/tests/e4x/TypeConversion/regress-302097.js
blob: 7b77f371419a4a5680153350c330114d6aee534b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
 * Any copyright is dedicated to the Public Domain.
 * http://creativecommons.org/licenses/publicdomain/
 * Contributors: Blake Kaplan, Bob Clary
 */


var summary = 'E4X - Function.prototype.toString should not quote {} ' +
    'attribute values';
var BUGNUMBER = 302097;
var actual = '';
var expect = '';

printBugNumber(BUGNUMBER);
START(summary);

function f(k) {
  return <xml k={k}/>;
}

actual = f.toString().replace(/</g, '&lt;');
expect = 'function f(k) {\n    return &lt;xml k={k}/>;\n}';

TEST(1, expect, actual);

END();