blob: 7e4a4f20e7cda6aec88cab740b63486de13d5a42 [file] [log] [blame]
description(
'This test checks some object construction cases, including ' +
'<a href="https://bugs.webkit.org/show_bug.cgi?id=5939">5939: final comma in javascript object prevents parsing</a>' +
'.');
shouldBe("var foo = { 'bar' : 'YES' }; foo.bar", "'YES'");
shouldBe("var foo = { 'bar' : 'YES', }; foo.bar", "'YES'");
shouldBe("var foo = { 'bar' : 'YES' , }; foo.bar", "'YES'");
shouldThrow("var foo = { , 'bar' : 'YES' }; foo.bar");
shouldThrow("var foo = { 'bar' : 'YES',, }; foo.bar");