regex-octoquad.js 1023 B

1234567891011121314151617181920212223
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. WScript.LoadScriptFile("..\\UnitTestFramework\\UnitTestFramework.js");
  6. var tests = [
  7. {
  8. name: "Case-folding should be applied for octoquad identifiers when the unicode flag is present",
  9. body: function () {
  10. assert.isTrue(/ABCKABC\u212a|akcabbck/giu.test('abckabck'))
  11. }
  12. },
  13. {
  14. name: "Case-folding should NOT be applied for octoquad identifiers when the unicode flag is NOT present",
  15. body: function () {
  16. assert.isFalse(/ABCKABC\u212a|akcabbck/gi.test('abckabck'))
  17. }
  18. },
  19. ];
  20. testRunner.runTests(tests, { verbose: WScript.Arguments[0] != "summary" });