unicode-bidirectional
unicode-bidirectional copied to clipboard
Conformance tests aren't running all cases
The conformance tests aren't running all the test cases. The bit mask in BidiTest.txt data is a mask of up to 3 different runs that should be made whereas the test cases are only running one case.
In ./test/conform/bidiclass/runner.js, instead of
const bitset = test.bitset;
const paragraphLevel = ((bitset & 2) > 0) ? 0 : 1;
const autoLTR = ((bitset & 1) > 0) ? true : false;
it should be something like this:
for (let bit = 1; bit < 8; bit = bit << 1)
{
if ((test.bitset & bit) == 0)
continue;
const paragraphLevel = ((bit & 2) > 0) ? 0 : 1;
const autoLTR = ((bit & 1) > 0) ? true : false;