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

Metric testcases fail with LANG=C #2834

Closed
dankamongmen opened this issue Jan 10, 2025 · 6 comments
Closed

Metric testcases fail with LANG=C #2834

dankamongmen opened this issue Jan 10, 2025 · 6 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@dankamongmen
Copy link
Owner

[schwarzgerat](1) $ ./notcurses-tester -tc=Metric -p ../data/
Running with LANG=C
Running with TERM=xterm-kitty
Detected cell geometry: 132x64
[doctest] doctest version is "2.4.11"
[doctest] run with "--help" for options
===============================================================================
/home/dank/src/dankamongmen/notcurses/src/tests/metric.cpp:24:
TEST CASE:  Metric
  NegativePowersOfTen

/home/dank/src/dankamongmen/notcurses/src/tests/metric.cpp:442: FATAL ERROR: REQUIRE( ncqprefix(val, 1000000000000000ull, buf, '\0') ) is NOT correct!
  values: REQUIRE( nullptr )

===============================================================================
[doctest] test cases:   1 |   0 passed | 1 failed | 45 skipped
[doctest] assertions: 581 | 580 passed | 1 failed |
[doctest] Status: FAILURE!
[schwarzgerat](1) $ 

this is causing us trouble in pbuilder and should obviously be fixed either way.

@dankamongmen dankamongmen added the bug Something isn't working label Jan 10, 2025
@dankamongmen dankamongmen added this to the 3.1.0 milestone Jan 10, 2025
@dankamongmen dankamongmen self-assigned this Jan 10, 2025
@dankamongmen
Copy link
Owner Author

confirmed it works fine with LANG=en_US.UTF-8.

@dankamongmen
Copy link
Owner Author

as predicted, this has to do with µ being pulled from subprefixes, meaning we're using UTF8_SUBPREFIX rather than ASCII_SUBPREFIX.

@dankamongmen
Copy link
Owner Author

yep we're calling into ncmetric_use_utf8_internal()

@dankamongmen
Copy link
Owner Author

oh christ

@dankamongmen
Copy link
Owner Author

fixed, incoming, stupid

@dankamongmen
Copy link
Owner Author

so we were testing utf rather than *utf8, which was always true, and thus always enabling utf8 for ncmetric.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant