Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Locale-specific test failures #6

Closed
eserte opened this issue Apr 6, 2022 · 6 comments
Closed

Locale-specific test failures #6

eserte opened this issue Apr 6, 2022 · 6 comments

Comments

@eserte
Copy link

eserte commented Apr 6, 2022

It seems that the test suite fails with a non-en-US locale:

# Testing HTML::T5 0.011, tidy 5.8.0, Perl 5.032001, /usr/perl5.32.1Dp/bin/perl
t/00-load.t ................ ok
HTML::T5: Unknown error type: Zeile 7 Spalte 1 - Fehler: <x> wird nicht erkannt! at t/cfg-for-parse.t line 27.
HTML::T5: Unknown error type: Zeile 8 Spalte 1 - Fehler: <y> wird nicht erkannt! at t/cfg-for-parse.t line 27.

#   Failed test 'Parsed OK'
#   at t/cfg-for-parse.t line 28.

#   Failed test 'Matching errors'
#   at t/cfg-for-parse.t line 32.
#     Structures begin differing at:
#          $got->[0] = Does not exist
#     $expected->[0] = 'DATA (7:1) Error: <x> is not recognized!'
# Looks like you failed 2 tests of 3.
t/cfg-for-parse.t .......... 
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/3 subtests 
HTML::T5: Unknown error type: Zeile 1 Spalte 1 - Warnung: fehlende <!DOCTYPE> Deklaration at t/clean-crash.t line 21.
HTML::T5: Unknown error type: Zeile 1 Spalte 1 - Warnung: f\xFCge implizites <body> ein at t/clean-crash.t line 21.
HTML::T5: Unknown error type: Zeile 1 Spalte 1 - Warnung: fehlendes </form> vor <td> at t/clean-crash.t line 21.
HTML::T5: Unknown error type: Zeile 2 Spalte 1 - Warnung: f\xFCge implizites <table> ein at t/clean-crash.t line 21.
HTML::T5: Unknown error type: Zeile 2 Spalte 1 - Warnung: fehlendes <tr> at t/clean-crash.t line 21.
HTML::T5: Unknown error type: Zeile 3 Spalte 1 - Fehler: Unerwartetes </form> verworfen at t/clean-crash.t line 21.
HTML::T5: Unknown error type: Zeile 2 Spalte 1 - Warnung: fehlendes </table> at t/clean-crash.t line 21.
HTML::T5: Unknown error type: Zeile 1 Spalte 1 - Warnung: fehlendes </form> at t/clean-crash.t line 21.
HTML::T5: Unknown error type: Zeile 1 Spalte 1 - Warnung: f\xFCge fehlendes 'title' Element ein at t/clean-crash.t line 21.
HTML::T5: Unknown error type: Tidy hat 8 Warnungen und 1 Fehler gefunden! at t/clean-crash.t line 21.
... etc ...

Even en_GB seems to be problematic:

#   Failed test 'Matching errors'
#   at t/cfg-for-parse.t line 32.
#     Structures begin differing at:
#          $got->[0] = 'DATA (7:1) Error: <x> is not recognised!'
#     $expected->[0] = 'DATA (7:1) Error: <x> is not recognized!'
# Looks like you failed 1 test of 3.
t/cfg-for-parse.t .......... 
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/3 subtests 
@eserte
Copy link
Author

eserte commented Apr 6, 2022

I used the following environment variable settings:

LANG=de_DE.utf8
LANG=en_GB.UTF-8

@shlomif
Copy link
Owner

shlomif commented Apr 9, 2022

should be fixed in 0.012. thanks

@eserte
Copy link
Author

eserte commented Apr 9, 2022

The fix probably needs to be applied to many more test scripts. It still fails, on some systems the summary looks like this:

Test Summary Report
-------------------
t/clean-crash.t          (Wstat: 256 Tests: 2 Failed: 1)
  Failed test:  2
  Non-zero exit status: 1
t/extra-quote.t          (Wstat: 768 Tests: 4 Failed: 3)
  Failed tests:  2-4
  Non-zero exit status: 3
t/html_tidy_ok.t         (Wstat: 512 Tests: 5 Failed: 2)
  Failed tests:  3, 5
  Non-zero exit status: 2
t/ignore-text.t          (Wstat: 512 Tests: 3 Failed: 2)
  Failed tests:  2-3
  Non-zero exit status: 2
t/ignore.t               (Wstat: 1024 Tests: 9 Failed: 4)
  Failed tests:  2-3, 5-6
  Non-zero exit status: 4
t/levels.t               (Wstat: 512 Tests: 3 Failed: 2)
  Failed tests:  2-3
  Non-zero exit status: 2
t/perfect.t              (Wstat: 256 Tests: 3 Failed: 1)
  Failed test:  2
  Non-zero exit status: 1
t/roundtrip.t            (Wstat: 0 Tests: 3 Failed: 0)
  TODO passed:   2
t/simple.t               (Wstat: 512 Tests: 4 Failed: 2)
  Failed tests:  2-3
  Non-zero exit status: 2
t/too-many-titles.t      (Wstat: 768 Tests: 4 Failed: 3)
  Failed tests:  2-4
  Non-zero exit status: 3

@shlomif
Copy link
Owner

shlomif commented Apr 10, 2022

@eserte : hi! please let me know if it works in 0.013 .

@eserte
Copy link
Author

eserte commented Apr 10, 2022

Yes, seems to be fixed now.

@eserte eserte closed this as completed Apr 10, 2022
@shlomif
Copy link
Owner

shlomif commented Apr 10, 2022

@eserte : thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants