Imported Upstream version 1.0.0
[platform/upstream/js.git] / js / src / tests / e4x / Expressions / regress-302531.js
1 /* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * Any copyright is dedicated to the Public Domain.
4  * http://creativecommons.org/licenses/publicdomain/
5  * Contributor: Blake Kaplan
6  */
7
8
9 var summary = "E4X QuoteString should deal with empty string";
10 var BUGNUMBER = 302531;
11 var actual = '';
12 var expect = '';
13
14 printBugNumber(BUGNUMBER);
15 START(summary);
16
17 function f(e) {
18   return <e {e}="" />;
19 }
20
21 XML.ignoreWhitespace = true;
22 XML.prettyPrinting = true;
23
24 expect = (
25     <e foo="" />
26     ).toXMLString().replace(/</g, '&lt;');
27
28 actual = f('foo').toXMLString().replace(/</g, '&lt;');
29
30 TEST(1, expect, actual);
31
32 END();