On Fri, Jul 13, 2012 at 01:32:03PM -0700, Danek Duvall wrote:
> Do you have any idea why the system configuration was relevant? They
> shouldn't have any effect on the images created in the testsuite.
>
> The newly-introduced japanese locale requirement is a bit different: the
> test that introduced that simply searches for one of a handful of utf-8
> locales that don't losslessly transcode to ascii, and uses the first it
> finds. But it doesn't look at facets, it looks at the output of "locale
> -a". Given that fr_FR.UTF-8 is the first one it tries, I'm surprised that
> what you had before didn't just work.
>
oops. the test check for the ja_JP locale and emits an error saying you
must have it installed if it isn't installed.
but that's not the failure i saw. the failure i saw was due to code
coverage being enabled. (which is weird because i remember explicitly
testing with code coverage disabled after i first hit the bug to make
sure that wasn't the problem, but i must have fat fingered something.)
the following patch fixes code coverage for this test:
---8<---
diff --git a/src/tests/cli/t_pkg_help.py b/src/tests/cli/t_pkg_help.py
--- a/src/tests/cli/t_pkg_help.py
+++ b/src/tests/cli/t_pkg_help.py
@@ -99,7 +99,8 @@ class TestPkgHelp(pkg5unittest.CliTestCa
# in the future then this test case will also need to be
# modified.
- ret, out = self.cmdline_run("/usr/bin/locale -a", out=True)
+ ret, out = self.cmdline_run("/usr/bin/locale -a", out=True,
+ coverage=False)
line = " ".join(out.split())
m = re.search(r"ja_JP.eucJP", line)
self.assert_(m, "You must have ja_JP.eucJP"
---8<---
that said, the test still fails for me even with this patch:
---8<---
# | File "./api/../cli/t_pkg_help.py", line 128, in
test_help_character_encoding
# | self.assertEqual(cmd_line, file_line)
# | AssertionError: u'Usage:' != u'\u4f7f\u7528\u65b9\u6cd5:'
---8<---
it seems like the output from the pkg command is not being localized at
all and i'm not sure why this is happening...
ed
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss