properties.js 1011 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. keep_properties: {
  2. options = {
  3. properties: false
  4. };
  5. input: {
  6. a["foo"] = "bar";
  7. }
  8. expect: {
  9. a["foo"] = "bar";
  10. }
  11. }
  12. dot_properties: {
  13. options = {
  14. properties: true
  15. };
  16. input: {
  17. a["foo"] = "bar";
  18. a["if"] = "if";
  19. a["*"] = "asterisk";
  20. a["\u0EB3"] = "unicode";
  21. a[""] = "whitespace";
  22. a["1_1"] = "foo";
  23. }
  24. expect: {
  25. a.foo = "bar";
  26. a["if"] = "if";
  27. a["*"] = "asterisk";
  28. a.\u0EB3 = "unicode";
  29. a[""] = "whitespace";
  30. a["1_1"] = "foo";
  31. }
  32. }
  33. dot_properties_es5: {
  34. options = {
  35. properties: true,
  36. screw_ie8: true
  37. };
  38. input: {
  39. a["foo"] = "bar";
  40. a["if"] = "if";
  41. a["*"] = "asterisk";
  42. a["\u0EB3"] = "unicode";
  43. a[""] = "whitespace";
  44. }
  45. expect: {
  46. a.foo = "bar";
  47. a.if = "if";
  48. a["*"] = "asterisk";
  49. a.\u0EB3 = "unicode";
  50. a[""] = "whitespace";
  51. }
  52. }