File: i18n_test.py

package info (click to toggle)
errbot 6.2.0%2Bds-5
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 3,796 kB
  • sloc: python: 11,557; makefile: 164; sh: 97
file content (24 lines) | stat: -rw-r--r-- 698 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# -*- coding=utf-8 -*-
from os import path

# This is to test end2end i18n behavior.

extra_plugin_dir = path.join(path.dirname(path.realpath(__file__)), "i18n_plugin")


def test_i18n_return(testbot):
    assert "язы́к" in testbot.exec_command("!i18n 1")


def test_i18n_simple_name(testbot):
    assert "OK" in testbot.exec_command("!ру́сский")


def test_i18n_prefix(testbot):
    assert "OK" in testbot.exec_command("!prefix_ру́сский")
    assert "OK" in testbot.exec_command("!prefix ру́сский")


def test_i18n_suffix(testbot):
    assert "OK" in testbot.exec_command("!ру́сский_suffix")
    assert "OK" in testbot.exec_command("!ру́сский suffix")