diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2023-02-16 07:56:46 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2023-02-16 10:05:29 +0000 |
commit | e2cd6fca2f94885e308e9454a2fc986b0ae5afe8 (patch) | |
tree | 6a163b6ac3dcc513ec7ea1d8262576da3a282264 /test | |
parent | cc584681cae755c6de07f343093259bbe034392a (diff) |
Improve testLocalizedProperty
c3bd52f81bf733a0b9b0560794a54b2ac1e0f444 "Use the (first segment of the)
original locale value for the workaround again" had stated: "The added test
code unfortunately doesn't actually test this piece of code, and somewhat
unexpectedly receives the "default" value from the empty string locale default,
rather than the "en-US" value from the higher precedence "en-US" locale default,
because `aFallbacks` happens to contain an empty string, so we already leave
Access::getChild early in the 'Find the best match using the LanguageTag
fallback mechanism, excluding the original tag' block." But, of course, the
relevant code can well be tested after all, using a localized property that
does not have a default no-xml:lang value.
(And add a TODO comment about the unexpected "default" vs. "en-US" in the
original test code, in case the LanguageTag::getFallbackStrings behavior ever
changes and the test starts to fail.)
Change-Id: I526a830a5929b6b5ad17ba57af5943954b07b86a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147137
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/user-template/registry-common/modifications.xcd | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/user-template/registry-common/modifications.xcd b/test/user-template/registry-common/modifications.xcd index 1d31141bb04b..f4698116b932 100644 --- a/test/user-template/registry-common/modifications.xcd +++ b/test/user-template/registry-common/modifications.xcd @@ -12,6 +12,8 @@ <component> <prop oor:name="localized" oor:localized="true" oor:type="xs:string"> </prop> + <prop oor:name="noDefaultLang" oor:localized="true" oor:type="xs:string"> + </prop> </component> </oor:component-schema> <oor:component-data oor:package="org.libreoffice" oor:name="unittest"> @@ -20,6 +22,9 @@ <value xml:lang="en-US">en-US</value> <value xml:lang="pt-PT">pt-PT</value> </prop> + <prop oor:name="noDefaultLang"> + <value xml:lang="en-US">en-US</value> + </prop> </oor:component-data> <oor:component-data xmlns:install="http://openoffice.org/2004/installation" oor:name="VCL" oor:package="org.openoffice"> <node oor:name="DefaultFonts"> |