Repository navigation
test: make the OFD, spreadsheet and preset-editor tests locale-independent - #1033
Merged
Merged
Conversation
…ndent
On a German system these tests failed although the code under test was
right: the OFD test packages were built with culture-formatted numbers
("3,5" instead of "3.5"), the LibreOffice cross-check compared text Calc
had formatted with its own locale's separators, and the two preset-editor
tests checked labels that follow the regional format. Build the OFD
markup with the invariant culture, compare the ODS-by-LibreOffice text
without separators (and allow the XLS column width the same tolerance,
since LibreOffice measures Korean text with its locale's East Asian
font), and pin the culture in the two preset-editor tests.
Co-authored-by: jojofox0815 <125126720+jojofox0815@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
11 of 13 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some tests fail on a German system although the code they test is right. This makes them pass whatever the regional format is.
OfdTests: the test OFD packages were written with culture-formatted numbers (Size="3,5"instead of3.5), so the reader got broken markup. The markup is now built withCultureInfo.InvariantCulture.SpreadsheetFormatTests.LibreOffice_reads_our_ods_and_we_read_its_ods_and_xls: an ODS saved by LibreOffice keeps the text Calc showed, with Calc's own separators (1.350.000원,12,8 %on a German system). That case is now compared without the separators. The XLS column width gets the same 25% tolerance as ODS, because LibreOffice measures Korean text with its locale's East Asian font; the column ratio check stays.RenderTests: the two preset-editor tests (Preset_editor_saves_every_frame_only_for_png_and_jpg,Preset_editor_shows_playback_speed_only_for_targets_that_keep_animations) check labels whose numbers follow the regional format (100,000,0.25×). They now pinen-US/ko-KRfor the test.Tests only, no product code.
Verified locally by forcing
de-DEthrough a temporary module initializer (not committed): on main, 8OfdTestsand both preset-editor tests fail underde-DE; with this change all of them pass underde-DEand under the defaultko-KR. The LibreOffice cross-check skips without LibreOffice installed, so that part wasn't run here.Split out of #583 by @jojofox0815, who wrote the original change.
🤖 Generated with Claude Code