tests/test-i18n.t
author David Golub <davidg@fogcreek.com>
Thu, 21 Jul 2011 16:02:34 -0400
branchstable
changeset 14914 41c3a71c318d
parent 14660 d29d31e0fdc3
child 14920 56848e2bb0c5
permissions -rw-r--r--
dispatch: avoid double backslashes in error message The use of %r in the format string caused Python to display Windows paths with double backslashes.

Translations are optional:

  $ "$TESTDIR/hghave" gettext || exit 80

Test that translations are compiled and installed correctly.

Default encoding in tests is "ascii" and the translation is encoded
using the "replace" error handler:

  $ LANGUAGE=pt_BR hg tip
  abortado: no repository found in '$TESTTMP' (.hg not found)!
  [255]

Using a more accomodating encoding:

  $ HGENCODING=UTF-8 LANGUAGE=pt_BR hg tip
  abortado: no repository found in '$TESTTMP' (.hg not found)!
  [255]

Different encoding:

  $ HGENCODING=Latin-1 LANGUAGE=pt_BR hg tip
  abortado: no repository found in '$TESTTMP' (.hg not found)!
  [255]