[squeak-dev] LanguageEnvironment

Levente Uzonyi leves at caesar.elte.hu
Wed Jun 13 19:41:25 UTC 2018


On Wed, 13 Jun 2018, Eliot Miranda wrote:

> Hi All,
>     in reviewing the tests given recent work leading up to the 5.2 release I see an error in LangEnvBugs>>testIsFontAvailable.
> 
> This is the phrase:
> 
>     (LanguageEnvironment localeID: 'en' ) isFontAvailable
> 
> But LanguageEnvironment class>>#localeID: expects a LocaleID as argument.  So is the fix to rewrite the test to use
> 
>     (LanguageEnvironment localeID: (LocaleID isoLanguage: 'en')) isFontAvailable
> 
> or to be more friendly:
> 
> localeID: localeIDOrISONameString
> 
> "LanguageEnvironment localeID: (LocaleID isoString: 'ja-kid')"
> "LanguageEnvironment localeID: (LocaleID isoString: 'xx')"
> localeIDOrISOName isString ifTrue:
> [^self  localeID: (LocaleID isoLanguage: localeIDOrISOName)].
> ^ self knownEnvironments
> at: localeIDOrISONameString
> ifAbsent: [localeIDOrISONameString hasParent
> ifTrue: [self knownEnvironments
> at: localeIDOrISONameString parent
> ifAbsent: [self localeID: 'en']]
> ifFalse: [self localeID: 'en']]
> 
> ?

Sounds good.

> 
> 
> And given that
>     self ensureInternetConnectionTo: 'http://metatoys.org/pub/'.
> fails and
> curl http://metatoys.com/pub
> <html><head><title>Object moved</title></head><body>
> <h2>Object moved to <a href="https://www.hugedomains.com/domain_profile.cfm?d=metatoys&e=com">here</a>.</h2>
> </body></html>
> 
> shouldn't LocaleTest>>#testIsFontAvailable be n expected failure?

It should. Here is our previous discussion about this test case: 
http://forum.world.st/LocaleTest-testIsFontAVailable-td4939155.html

Levente

> 
> _,,,^..^,,,_
> best, Eliot
> 
>


More information about the Squeak-dev mailing list