From bdb0fb307f66d39c57eb0e076bb5a37060aa45b8 Mon Sep 17 00:00:00 2001 From: Adrian Heine <mail@adrianheine.de> Date: Mon, 16 Jan 2017 23:03:30 +0100 Subject: [PATCH] Improve move_bidi test set * Enable most in phantom * Enable all in !phantom * Disable two that trigger L1 which we don't do correctly currently * Revert commit 5cc5d7f50efc7a016485f017a603c4fa2b035266 (L1 tests) --- test/test.js | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/test/test.js b/test/test.js index c4941cfe..4853e670 100644 --- a/test/test.js +++ b/test/test.js @@ -2216,13 +2216,11 @@ function makeItWrapAfter(cm, pos) { cm.setSize(w); posTop = cm.charCoords(pos).top; } - // Firefox > 50 compresses a space when two spaces from different bidi spans meet - cm.setSize(w + 10); } function testMoveBidi(str) { testCM("move_bidi_" + str, function(cm) { - if (cm.getOption("inputStyle") != "textarea" || webkit || !cm.getOption("rtlMoveVisually")) return; + if (cm.getOption("inputStyle") != "textarea" || !cm.getOption("rtlMoveVisually")) return; cm.getScrollerElement().style.fontFamily = "monospace"; makeItWrapAfter(cm, Pos(0, 5)); @@ -2285,26 +2283,37 @@ function testMoveBidi(str) { }, {value: str, lineWrapping: true}) }; +// We don't correctly implement L1 UBA +// See https://bugzilla.mozilla.org/show_bug.cgi?id=1331501 +// and https://bugs.chromium.org/p/chromium/issues/detail?id=673405 +/* testMoveBidi("Say ا ب جabj\nS"); -testMoveBidi("ÎŒÈÇڪȉۥ״ۺ׆ɀҩÛ\nÒ³"); +testMoveBidi("Sayyy ا ا ب ج"); +*/ + +if (!phantom) { + testMoveBidi("ÎŒÈÇڪȉۥ״ۺ׆ɀҩÛ\nÒ³"); + testMoveBidi("ŌӰтقȤØƥ؅٣ĎȺ١\nÏš"); + testMoveBidi("ٻоҤѕѽΩ־؉ïίքdz\nÙµ"); + testMoveBidi("Ø…ØĆՕƿÉÇžÏ®Ø È©Ã³Ä‡\nÄ"); + testMoveBidi("RŨÄңŪzϢŎÆÔ–Ú‡Ú¦\nÓˆ"); +} + testMoveBidi("ό׊۷٢ԜһОצЉيÄÇŸ\nÑ©"); testMoveBidi("ۑÚҳҕڬġڹհÑųKV\nr"); -testMoveBidi("ŌӰтقȤØƥ؅٣ĎȺ١\nÏš"); -testMoveBidi("ٻоҤѕѽΩ־؉ïίքdz\nÙµ"); -//testMoveBidi("Count Ù¡ Ù¢ Ù£ Ù¤"); -testMoveBidi("Sayyy ا ا ب ج"); -testMoveBidi("Ø…ØĆՕƿÉÇžÏ®Ø È©Ã³Ä‡\nÄ"); testMoveBidi("źڻғúÛ4×1È c1a\nÔ"); testMoveBidi("ҒȨҟփƞ٦ԓȦڰғâƥ\nÚ¤"); testMoveBidi("քմѧǮßپüŢÒҞўڳ\nÓ§"); -testMoveBidi("RŨÄңŪzϢŎÆÔ–Ú‡Ú¦\nÓˆ"); testMoveBidi("ϖسՉÈŧΔԛdžĎӟیڡ\nÎ"); testMoveBidi("۹ؼL۵ĺȧКԙػ×7×´\nÙ…"); + +//testMoveBidi("Count Ù¡ Ù¢ Ù£ Ù¤"); //testMoveBidi("Ó£×Ʀϰ؊ȓÛÛوը٬ز\nϪ"); //testMoveBidi("ҾճٳџIÕ–Ó»Ù¥×ÖØœÚ\nÛŽ"); //testMoveBidi("ҬÓФ؜ڂį٦ϿɓÚͳٵ\nÕˆ"); //testMoveBidi("aÑ´NijȻهˇ҃ڱӧǻֵ\na"); //testMoveBidi(" a٧ا٢ ب جa\nS"); + /* for (var i = 0; i < 5; ++i) { testMoveBidi(getString(12) + "\n" + getString(1)); -- GitLab