Commit Graph

22 Commits

Author SHA1 Message Date
Jean-Sébastien Pédron
4940dc8aa3 Import new testsuite framework from "otis"
See "otis" ChangeLog.
2011-06-23 18:14:41 +02:00
Jean-Sébastien Pédron
55a7b2bb1e Testsuite reports are now floating
... so that they line up if there's enough horizontal space.

Taken from:	bones
2011-06-09 08:44:57 +02:00
Jean-Sébastien Pédron
07dce88810 Pass $PACKAGE_NAME to the test
It's required to define ?APPLICATION.

Taken from:	bones
2011-06-07 16:03:18 +02:00
Jean-Sébastien Pédron
487f1bf948 Keep the covered modules in the order specified by "COVERED-MODS"
Taken from:	bones
2011-06-07 11:39:25 +02:00
Jean-Sébastien Pédron
484bfe2c5d Add $(srcdir) to the include directories
... when cover-compiling modules

Taken from:	bones
2011-06-07 11:33:48 +02:00
Jean-Sébastien Pédron
ff07166b54 Pass the ERL_LIBS environment variable to tests
This is needed if a test depends on a 3rd-party application.

Taken from:	bones
2011-06-07 11:32:31 +02:00
Jean-Sébastien Pédron
92e5e9e542 The COVERED-MODS file lists files, not modules
This change fixes cases where modules are in a subdirectory of the src/
directory.

The fix is imported from the "bones" project.
2011-06-03 13:46:58 +02:00
Jean-Sébastien Pédron
6a63c539fd Update testsuite after errors handling update
The main change is the new exception format.
2011-06-01 09:53:33 +02:00
Jean-Sébastien Pédron
c2442af693 Fix a bug in testsuite/template.erl
If a module was completely covered by a testsuite, it would mark the
coverage as "n/a" instead of "100%".

The fix is imported from the "bones" project.
2011-05-31 09:30:20 +02:00
Jean-Sébastien Pédron
190bc1e33a Update testsuite following update of exceptions
Exceptions were modified:
    o  The message doesn't end with "\n" anymore.
    o  The invalid option exception format now reflects the common
       format.
2011-05-31 09:03:52 +02:00
Jean-Sébastien Pédron
26a4718372 Fix timestamp construction test
The testcase was not fixed after an update of yaml_node_timestamp.
2011-05-26 16:17:25 +02:00
Jean-Sébastien Pédron
7d0a221584 Add representation testsuite
The testsuite isn't complete yet. For now, only node construction is
tested (with and without "simple_structs").
2011-05-26 16:09:33 +02:00
Jean-Sébastien Pédron
bdbaa64743 Fix color code handling
The percentage rounding was wrong: 76 was rounded to 70 instead of 75.
Moreover, we now round to the greated multiple of 5 (except for 0).
Therefore, 76 is now rounded to 80.
2011-05-26 15:32:05 +02:00
Jean-Sébastien Pédron
e4bd9de170 Write .percent file even if module isn't tested
This file is used by cover_to_html.sh.
2011-05-26 10:59:26 +02:00
Jean-Sébastien Pédron
3b0bb7abb3 Add color code base on test coverage
The color is used in "index.html" in front of each module.
2011-05-26 10:58:13 +02:00
Jean-Sébastien Pédron
cb5f09409b Renamed testsuite "t_yaml_parser" to "parsing"
While here, add the list of covered modules in the COVERED-MODS file.
2011-05-26 10:15:22 +02:00
Jean-Sébastien Pédron
3d715a24f7 Improve testsuite
o  Covered modules are now explicitly listed in each testsuite. This
       permits to cover multiple modules by one testsuite.
    o  An index.html file is generated. It lists all testsuites and
       their covered modules.
2011-05-26 10:13:34 +02:00
Jean-Sébastien Pédron
fb489eae92 Update tests about exceptions
The exception format has changed in yaml_parser.
2011-05-24 12:30:59 +02:00
Jean-Sébastien Pédron
0000dfcb97 Improve options handling
o  If an option is invalid, throw a #yaml_parser_error without any
   #yaml_parser enveloppe.
o  Add functions to get or change the token_fun function.
2011-03-29 10:48:45 +02:00
Jean-Sébastien Pédron
362ee1d6d3 Add option to force document version
The document version can be forced using the following option:
  {doc_version, {Major, Minor}}
where Major and Minor are positive integers.

When this option is specified, {Major, Minor} will be used, even if a
%YAML directive indicates another version.
2011-03-22 17:29:08 +01:00
Jean-Sébastien Pédron
554c88e8bb Testsuite for non-ASCII line breaks 2011-03-22 10:59:06 +01:00
Jean-Sébastien Pédron
120ef7ea16 Initial version of a YAML 1.2 parser
This parser is written against the YAML 1.2 specification. It may
therefore be used as a JSON parser as well.

The project is an Erlang application. The module "yaml_parser" parses a
YAML source (a string, a file, whatever) and runs a callback function
for each token scanned. It's more or less like a SAX XML parser.

The testsuite provided isn't complete yet, though it contains all the
example found in the specification.
2011-03-07 11:43:52 +01:00