diff options
author | shimizukawa <shimizukawa@gmail.com> | 2013-10-03 02:53:53 +0000 |
---|---|---|
committer | shimizukawa <shimizukawa@gmail.com> | 2013-10-03 02:53:53 +0000 |
commit | a4e91f7947b1290fd85465f719dfbc4d4e510785 (patch) | |
tree | 945f2c2461742f487accb276062222d34ad4970f | |
parent | 7952dbb0cfe1460659e757c7e9aea59e1bdd90c5 (diff) | |
download | sphinx-a4e91f7947b1290fd85465f719dfbc4d4e510785.tar.gz |
Add test refs #1265 (comment-6264794) to validate translated label link shifting.
-rw-r--r-- | tests/roots/test-intl/label_target.po | 8 | ||||
-rw-r--r-- | tests/roots/test-intl/label_target.txt | 3 | ||||
-rw-r--r-- | tests/test_intl.py | 9 |
3 files changed, 20 insertions, 0 deletions
diff --git a/tests/roots/test-intl/label_target.po b/tests/roots/test-intl/label_target.po index 69844016..60d7c3e5 100644 --- a/tests/roots/test-intl/label_target.po +++ b/tests/roots/test-intl/label_target.po @@ -56,3 +56,11 @@ msgstr "X LABEL BRIDGED TARGET SECTION" msgid "`bridge label`_ is not translatable but linked to translated section title." msgstr "X `bridge label`_ IS NOT TRANSLATABLE BUT LINKED TO TRANSLATED SECTION TITLE." +msgid "" +"`bridge label2`_ point to ``section and label`` and `bridge label`_ point to " +"``label bridged target section``. The second appeared `bridge label2`_ point " +"to correct target." +msgstr "" +"X `bridge label`_ POINT TO ``LABEL BRIDGED TARGET SECTION`` AND " +"`bridge label2`_ POINT TO ``SECTION AND LABEL``. THE SECOND APPEARED " +"`bridge label2`_ POINT TO CORRECT TARGET." diff --git a/tests/roots/test-intl/label_target.txt b/tests/roots/test-intl/label_target.txt index 635de847..ac000849 100644 --- a/tests/roots/test-intl/label_target.txt +++ b/tests/roots/test-intl/label_target.txt @@ -54,6 +54,7 @@ duplicated sub section .. _bridge label: `label bridged target section`_ +.. _bridge label2: `section and label`_ label bridged target section ============================= @@ -62,3 +63,5 @@ label bridged target section `bridge label`_ is not translatable but linked to translated section title. +`bridge label2`_ point to ``section and label`` and `bridge label`_ point to ``label bridged target section``. The second appeared `bridge label2`_ point to correct target. + diff --git a/tests/test_intl.py b/tests/test_intl.py index 13cdc84a..744e1679 100644 --- a/tests/test_intl.py +++ b/tests/test_intl.py @@ -462,6 +462,15 @@ def test_i18n_label_target(app): 'IS NOT TRANSLATABLE BUT LINKED TO TRANSLATED ' + 'SECTION TITLE.'], refs=['label-bridged-target-section']) + assert_elem( + para3[1], + texts=['X', 'bridge label', 'POINT TO', + 'LABEL BRIDGED TARGET SECTION', 'AND', 'bridge label2', + 'POINT TO', 'SECTION AND LABEL', '. THE SECOND APPEARED', + 'bridge label2', 'POINT TO CORRECT TARGET.'], + refs=['label-bridged-target-section', + 'section-and-label', + 'section-and-label']) @with_intl_app(buildername='text', warning=warnfile) |