UglifyJS/test/compress/properties.js
Justin Lau 8227e8795b Added scenario in test case where properties shouldn't be accessed with
dotted syntax even with screw_ie8 option.
Signed-off-by: Justin Lau <justin@tclau.com>
2013-05-05 22:08:13 +08:00

45 lines
713 B
JavaScript

keep_properties: {
options = {
properties: false
};
input: {
a["foo"] = "bar";
}
expect: {
a["foo"] = "bar";
}
}
dot_properties: {
options = {
properties: true
};
input: {
a["foo"] = "bar";
a["if"] = "if";
a["*"] = "asterisk";
}
expect: {
a.foo = "bar";
a["if"] = "if";
a["*"] = "asterisk";
}
}
dot_properties_es5: {
options = {
properties: true,
screw_ie8: true
};
input: {
a["foo"] = "bar";
a["if"] = "if";
a["*"] = "asterisk";
}
expect: {
a.foo = "bar";
a.if = "if";
a["*"] = "asterisk";
}
}