Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 20 additions & 9 deletions doc/reference/reference_lua/tap.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
-------------------------------------------------------------------------------
Module tap
-------------------------------------------------------------------------------
Module tap
==========

===============================================================================
Overview
===============================================================================
Overview
--------

The ``tap`` module streamlines the testing of other modules. It allows writing
of tests in the
Expand All @@ -14,9 +12,8 @@ standard TAP-analyzers so they can be passed to utilities such as
one can run tests and then use the results for statistics, decision-making, and
so on.

===============================================================================
Index
===============================================================================
Index
-----

.. container:: table

Expand Down Expand Up @@ -342,11 +339,25 @@ so on.
and :ref:`taptest:is_deeply() <taptest-is_deeply>`
must be compared strictly with ``nil``.
Set ``taptest.strict=false`` if ``nil`` and ``box.NULL`` both have the same effect.

The default is false.
For example, if and only if ``taptest.strict=true`` has happened,
then ``taptest:is_deeply({a = box.NULL}, {})``
will return ``false``.

Since :tarantool-release:`2.8.3`, ``taptest.strict`` is inherited in all subtests:

.. code-block:: lua

t = require('tap').test('123')
t.strict = true

t:is_deeply({a = box.NULL}, {}) -- false

t:test('subtest', function(t)
t:is_deeply({a = box.NULL}, {}) -- also false
end)


.. _tap-example:

Expand Down
49 changes: 42 additions & 7 deletions locale/ru/LC_MESSAGES/reference/reference_lua/tap.po
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

msgid "Module `tap`"
#, fuzzy
msgid "Module tap"
msgstr "Модуль `tap`"

msgid "Overview"
Expand Down Expand Up @@ -200,9 +201,9 @@ msgid ""
msgstr ""
"Такую проверку следует проводить только по завершении всех запланированных "
"тестов, поэтому как правило, ``taptest:check()`` появится лишь в конце "
"скрипта. Тем не менее, в качестве расширения Tarantool, "
"``taptest:check()`` может появиться в начале любого подтеста. Таким образом,"
" проверка появится в трех случаях:"
"скрипта. Тем не менее, в качестве расширения Tarantool, ``taptest:check()`` "
"может появиться в начале любого подтеста. Таким образом, проверка появится в"
" трех случаях:"

msgid "by calling ``taptest:check()`` at the end of a script,"
msgstr "при вызове ``taptest:check()`` в конце скрипта,"
Expand Down Expand Up @@ -360,14 +361,35 @@ msgstr ""
"Проверка соответствия значения определенному типу. Отображается длинное "
"сообщение, если значение не принадлежит указанному типу."

msgid "value the type of which is to be checked"
msgstr ""

msgid "type of data that a passed value should have"
msgstr ""

msgid "text that will be shown to the user in case of failure"
msgstr ""

msgid ""
"test:iscdata(slab_info.quota_size, ffi.typeof('uint64_t'), "
"'memcached.slab.info().quota_size returns a cdata')"
msgstr ""

msgid ""
"Set ``taptest.strict=true`` if :ref:`taptest:is() <taptest-is>` and "
":ref:`taptest:isnt() <taptest-isnt>` and :ref:`taptest:is_deeply() <taptest-"
"is_deeply>` must be compared strictly with ``nil``. Set "
"``taptest.strict=false`` if ``nil`` and ``box.NULL`` both have the same "
"effect. The default is false. For example, if and only if "
"``taptest.strict=true`` has happened, then ``taptest:is_deeply({a = "
"box.NULL}, {})`` will return ``false``."
"effect."
msgstr ""

msgid ""
"The default is false. For example, if and only if ``taptest.strict=true`` "
"has happened, then ``taptest:is_deeply({a = box.NULL}, {})`` will return "
"``false``."
msgstr ""

msgid "Note that ``taptest.strict`` is the same for all subtests:"
msgstr ""

msgid "Example"
Expand Down Expand Up @@ -431,3 +453,16 @@ msgstr ""
" ok - 2 + 3 is not 4\n"
" # Some subtests for test2: end\n"
"ok - some subtests for test2"

#~ msgid ""
#~ "Set ``taptest.strict=true`` if :ref:`taptest:is() <taptest-is>` and "
#~ ":ref:`taptest:isnt() <taptest-isnt>` and :ref:`taptest:is_deeply() <taptest-"
#~ "is_deeply>` must be compared strictly with ``nil``. Set "
#~ "``taptest.strict=false`` if ``nil`` and ``box.NULL`` both have the same "
#~ "effect. The default is false. For example, if and only if "
#~ "``taptest.strict=true`` has happened, then ``taptest:is_deeply({a = "
#~ "box.NULL}, {})`` will return ``false``."
#~ msgstr ""

#~ msgid "Note that ``taptest.strict`` is the same for subtests:"
#~ msgstr ""