Skip to content

Commit 2351c6a

Browse files
committed
🧪 add tests for solution directive
1 parent 3f3b027 commit 2351c6a

File tree

48 files changed

+272
-243
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+272
-243
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
_enum_duplicate_label
2+
=====================
3+
4+
.. exercise:: duplicate directive 1
5+
:label: dup
6+
7+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
8+
9+
10+
11+
.. exercise:: duplicate directive 2
12+
:label: dup
13+
14+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

tests/books/test-mybook/index.rst

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,22 @@ A Test Program!
2727
exercise/_unenum_numref_title
2828
exercise/_unenum_numref_mathtitle
2929

30+
exercise/_enum_duplicate_label
3031

32+
solution/_linked_enum
33+
solution/_linked_enum_class
34+
solution/_linked_missing_arg
35+
solution/_linked_unenum_mathtitle
36+
solution/_linked_unenum_mathtitle2
37+
solution/_linked_unenum_notitle
38+
solution/_linked_unenum_title
39+
solution/_linked_wrong_targetlabel
3140

32-
solution/_solution_with_duplicate_label
33-
solution/_solution_missing_arg
34-
solution/_solution_ref_with_nonumber_notitle
35-
solution/_solution_ref_with_nonumber_title
36-
solution/_solution_ref_with_nonumber_title_inlinemath
37-
solution/_solution_ref_with_nonumber_title_inlinemath2
38-
solution/_solution_ref_with_number
39-
solution/_solution_ref_wrong_solution_ref
40-
solution/_solution_with_exercise_nonumber_notitle
41-
solution/_solution_with_exercise_nonumber_title
42-
solution/_solution_with_exercise_nonumber_title_inlinemath
43-
solution/_solution_with_exercise_nonumber_title_inlinemath2
44-
solution/_solution_with_exercise_number
45-
solution/_solution_with_label_and_class
46-
solution/_solution_with_wrong_exlabel
41+
solution/_linked_ref_unenum_notitle
42+
solution/_linked_ref_unenum_title
43+
solution/_linked_ref_unenum_mathtitle
44+
solution/_linked_ref_unenum_mathtitle2
45+
solution/_linked_ref_enum
46+
47+
solution/_linked_ref_wronglabel
48+
solution/_linked_duplicate_label
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
_linked_duplicate_label
2+
=======================
3+
4+
5+
.. solution:: ex-nonumber-notitle
6+
:label: sol-duplicate-label
7+
8+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
9+
10+
.. solution:: ex-nonumber-notitle
11+
:label: sol-duplicate-label
12+
13+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

tests/books/test-mybook/solution/_solution_with_exercise_number.rst renamed to tests/books/test-mybook/solution/_linked_enum.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
_solution_with_exercise_number
2-
==============================
1+
_linked_enum
2+
============
33

44

55
.. exercise:: This is a title

tests/books/test-mybook/solution/_solution_with_label_and_class.rst renamed to tests/books/test-mybook/solution/_linked_enum_class.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
_solution_with_label_and_class
2-
==============================
1+
_linked_enum_class
2+
==================
33

44
.. solution:: ex-number
55
:label: solution-label
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
_linked_missing_arg
2+
===================
3+
4+
.. solution::
5+
6+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
_linked_ref_enum
2+
================
3+
4+
5+
referencing: :ref:`sol-number`.
6+
7+
referencing: :ref:`simple solution with number <sol-number>`.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
_linked_ref_unenum_mathtitle
2+
============================
3+
4+
5+
referencing: :ref:`sol-nonumber-title-math`.
6+
7+
referencing: :ref:`exercise with nonumber but with inline math title <sol-nonumber-title-math>`.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
_linked_ref_unenum_mathtitle2
2+
=============================
3+
4+
5+
referencing: :ref:`sol-nonumber-title-math2`.
6+
7+
referencing: :ref:`exercise with nonumber but with inline math title ex2 <sol-nonumber-title-math2>`.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
_linked_ref_unenum_notitle
2+
==========================
3+
4+
5+
referencing: :ref:`sol-nonumber-notitle`.
6+
7+
referencing: :ref:`ex with nonumber and notitle <sol-nonumber-notitle>`.

0 commit comments

Comments
 (0)