Re: Test failed `TestBreakIterator::testLao` with icu 70

2021-11-16 Thread Eike Rathke
Hi,

On Saturday, 2021-11-13 19:56:31 +, oxalica wrote:

> I'm on NixOS and we recently updated a libreoffice dependency `icu` to 70.
> When building libreoffice 7.2.2.2 with `--with-system-libs`, it builds 
> successfully but fails exact one unit test.

I just encountered the same while updating the bundled ICU to 70.1

(btw, you'd encounter more build breakage in a debug build with
--enable-werror because of missing handling of new script and block
values)

> I can confirm that downgrading `icu` back to 69.0 fixes the test 
> failure. But I'm not sure what is this test doing and I cannot read Lao. 

Me neither..

> Does the test need updating, or there it's an issue of the new `icu` 70.0?

Not sure yet. I temporarily adapted that one check failing (the other
passes) now in the change https://gerrit.libreoffice.org/c/core/+/125322
with
https://gerrit.libreoffice.org/c/core/+/125322/1/i18npool/qa/cppunit/test_breakiterator.cxx

> I also notice that the `testLao` is currently guarded and only be 
> enabled if icu >51. Does it depends on some icu behaviors and we should 
> also exclude it for icu >=70?

The handling of Lao script word break likely wasn't implemented in
earlier ICUs, or the test was implemented when ICU 51 was current,
I didn't chase it down. I excluded the one check *only* for 70
(not >=70) so if it doesn't get fixed (either on our or ICU's side)
we'll get slapped again with the next major update.

  Eike

-- 
GPG key 0x6A6CD5B765632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A


signature.asc
Description: PGP signature


Re: Test failed `TestBreakIterator::testLao` with icu 70

2021-11-15 Thread Caolán McNamara
On Sat, 2021-11-13 at 19:56 +, oxalica wrote:
> Hello,
> 
> I'm on NixOS and we recently updated a libreoffice dependency `icu`
> to 70.
...
> > /build/libreoffice-
> > 7.2.2.2/i18npool/qa/cppunit/test_breakiterator.cxx:865:TestBreakIte
> > rator::testLao
> > equality assertion failed
> > - Expected: 9
> > - Actual  : 12
> 
> I can confirm that downgrading `icu` back to 69.0 fixes the test 
> failure. But I'm not sure what is this test doing and I cannot read
> Lao.

The test is querying where the words in a Lao sentence are considered
to start and end. Lao, like Thai and a few others, don't typically use
spaces between words which makes figuring that out trickier than for
other languages.

> Does the test need updating, or there it's an issue of the new `icu`
> 70.0?

I have no idea, but its one or the other :-). If you disable/comment-
out the test and carry on, the outcome is that there will be a
difference in where a paragraph breaks when it word wraps from icu69 to
icu70 for Lao text.



Test failed `TestBreakIterator::testLao` with icu 70

2021-11-13 Thread oxalica
Hello,

I'm on NixOS and we recently updated a libreoffice dependency `icu` to 70.



When building libreoffice 7.2.2.2 with `--with-system-libs`, it builds 
successfully but fails exact one unit test.

> /build/libreoffice-7.2.2.2/i18npool/qa/cppunit/test_breakiterator.cxx:865:TestBreakIterator::testLao
> equality assertion failed
> - Expected: 9
> - Actual  : 12

I can confirm that downgrading `icu` back to 69.0 fixes the test 
failure. But I'm not sure what is this test doing and I cannot read Lao. 
Does the test need updating, or there it's an issue of the new `icu` 70.0?

I also notice that the `testLao` is currently guarded and only be 
enabled if icu >51. Does it depends on some icu behaviors and we should 
also exclude it for icu >=70?

The full log of build and test can be seen here,


Thanks,
Oxalica