web 3d图形渲染器
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
604 B

  1. 'use strict';
  2. var fails = require('./fails');
  3. // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,
  4. // so we use an intermediate function.
  5. function RE(s, f) {
  6. return RegExp(s, f);
  7. }
  8. exports.UNSUPPORTED_Y = fails(function () {
  9. // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
  10. var re = RE('a', 'y');
  11. re.lastIndex = 2;
  12. return re.exec('abcd') != null;
  13. });
  14. exports.BROKEN_CARET = fails(function () {
  15. // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
  16. var re = RE('^r', 'gy');
  17. re.lastIndex = 2;
  18. return re.exec('str') != null;
  19. });