[squeak-dev] LanguageEnvironment

Eliot Miranda eliot.miranda at gmail.com
Wed Jun 13 16:49:37 UTC 2018

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'))

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']]


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="

shouldn't LocaleTest>>#testIsFontAvailable be n expected failure?

best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20180613/6b64cc6b/attachment.html>

More information about the Squeak-dev mailing list