Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Tue, 14 Jan 2014 21:26:54 UTC Commit: 5975931be8b43086da947728406408e6dc332445 https://github.com/geany/geany/commit/5975931be8b43086da947728406408e6dc3324...
Log Message: ----------- Add a section on how to add a test for a parser in HACKING
Modified Paths: -------------- HACKING
Modified: HACKING 22 files changed, 22 insertions(+), 0 deletions(-) =================================================================== @@ -541,6 +541,28 @@ Unless your parser uses C-like tag type kinds, update add_top_level_items() for foo, calling tag_list_add_groups(). See get_tag_type_iter() for which tv_iters fields to use.
+Tests +````` +The tag parser tests checks if the proper tags are emitted +for a given source. Tests for tag parsers consist of two files: the +source to parse, and the expected output. Tests are run using ``make +check``. + +The source to parse should be in the file ``tests/ctags/mytest.ext``, +where ``mytest`` is the name you choose for your test, and ``ext`` is an +extension recognized by Geany as the language the test file is for. +This file should contain a snippet of the language to test for. +It can be either long or short, depending on what it tests. + +The expected output should be in the file ``tests/ctags/mytest.ext.tags`` +(which is the same name as the source, but with ``.tags`` appended), and +should be in the format generated by ``geany -g``. This file contains +the tag information expected to be generated from the corresponding +source file. + +When you have these two files, you have to list your new test along the +other ones in the ``test_source`` variable in ``tests/ctags/Makefile.am``. +Please keep this list sorted alphabetically.
GDB ---
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).