Jean-Sébastien Pédron
34e62e795c
Complete node modules for all standard types
...
The modules "yaml_node_bool" and "yaml_node_int" are renamed to
"yaml_node_ext_bool" and "yaml_node_ext_int", because they do not
implement what is written in the YAML 1.2 specification but the ones
from the types repository (http://yaml.org/type/ ).
New modules are added to implement the officiel YAML 1.2 types and the
JSON types (defined in this same specification). Note that these new
modules are untested material.
2011-09-27 15:25:19 +02:00
Jean-Sébastien Pédron
734788df4a
Fix terminology: replace "represent" by "construct"
...
Representation is a completely unrelated step during YAML dump. The
correct name is "Construction".
2011-09-27 10:13:42 +02:00
Jean-Sébastien Pédron
5567c718d3
Remove debugging io:format/3
2011-06-30 17:41:36 +02:00
Jean-Sébastien Pédron
828eb0aead
Fix include directories given to cover:compile/2
...
The directories, taken from src/Emakefile are relative to src/, not
testsuite/: they need to be adapted.
2011-06-30 17:34:50 +02:00
Jean-Sébastien Pédron
3c7db77ed7
Enable Surefire reports of EUnit
...
This produces XML files in testsuite/. They should be accepted by Bamboo
or Jenkins Continuous Integration systems.
2011-06-30 16:50:41 +02:00
Jean-Sébastien Pédron
3a6db97739
Add support for includes
2011-06-29 18:26:03 +02:00
Jean-Sébastien Pédron
69656691c1
Remove one last $Revision$
2011-06-29 18:25:58 +02:00
Jean-Sébastien Pédron
3706b80a6a
Remove $Id$ from yaml.app
2011-06-29 18:06:21 +02:00
Jean-Sébastien Pédron
e82279ff1c
Distribute debian/source directory
2011-06-29 17:47:48 +02:00
Jean-Sébastien Pédron
78671683ea
Import last cleanups from "bones"
...
Mostly:
o updates to autotools files
o removal of $Id$ and $Revision
o cleanups of Debian package
2011-06-29 17:15:01 +02:00
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
bfe12fe0e9
Rename package from "yaml" to "erlang-yaml"
...
The main reason is to avoid conflict.
2011-06-23 18:02:52 +02:00
Jean-Sébastien Pédron
1bd7278bab
Ignore files produced by Debian package building
2011-06-23 18:02:18 +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
5042842a29
Update includes and error records
2011-06-01 09:54:17 +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
0e002e18f3
Add yaml_errors.erl to Makefile.am
2011-06-01 09:53:02 +02:00
Jean-Sébastien Pédron
9bb39d11b3
Fix several warnings reported by Dialyzer
...
All warnings were fixed. The next step is to experiment with PLT
building.
2011-06-01 09:51:40 +02:00
Jean-Sébastien Pédron
f757c4674d
Rework headers by isolating private ones
...
The private headers are now in "include/internal". They're still
installed because they are needed by dialyzer.
2011-05-31 16:41:43 +02:00
Jean-Sébastien Pédron
b62b23c21b
Move error handling to yaml_errors
...
Error records were redefined:
o #yaml_invalid_option{}
o #yaml_parsing_error{}
An exception now has always the form:
#yaml_exception{errors = [
#yaml_invalid_option{} | #yaml_parsing_error{}
]}
This new #yaml_exception{} record is public and can be accessed
directly. But the yaml_errors module provides functions to get only
errors or warnings.
2011-05-31 16:33:03 +02:00
Jean-Sébastien Pédron
da5392eed8
Fix errors reported by dialyzer(1)
...
Errors are:
o s/simpl_estructs/simple_structs/.
o Line and columns in src/erlang_node_fun.erl must be greater than
or equal to 1.
o s/io_lib:flatten/lists:flatten/.
2011-05-31 11:27:42 +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
f0d13e10bd
Fix invalid option exception format
...
The exception previously contained only the #yaml_parser_error record,
unlike other exceptions where the parser state was inside a
{yaml_parser, Parser} tuple.
Now, the #yaml_parser_error record is inside this tuple too.
2011-05-31 09:02:13 +02:00
Jean-Sébastien Pédron
de0f7ef171
Remove newline characters from error messages
...
Adding a newline character after an error message is made by the caller.
2011-05-27 16:07:39 +02:00
Jean-Sébastien Pédron
89189a067a
Preload Core Schema modules
...
This is done once when the application starts instead of during each
call to yaml_repr:represent/2.
2011-05-27 16:06:17 +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
f04181c291
With simple_structs enabled, return root nodes
...
If "simple_structs" is enabled, we don't return a list of #yaml_doc, but
a list of root nodes.
2011-05-26 15:41:16 +02:00
Jean-Sébastien Pédron
24a56f503f
Time undefined for a date-only timestamp
...
If the timestamp as the form "DD:MM::YYYY", the time is set to
"undefined" instead of "00:00:00".
2011-05-26 15:40:49 +02:00
Jean-Sébastien Pédron
fb56071724
Use inet_parse:{ipv4,ipv6}strict_address/1
...
The inet_parse:address/1 calls inet_parse:ipv4_address/1 function which
accepts (stringified) integers. For instance, "1" is parsed as {0,0,0,1}
and "256" is parsed as {0,0,1,0}.
Now, yaml_node_ipaddr calls inet_parse:ipv4strict_address/1 then
inet_parse:ipv6strict_address/1 directly. Integers are not accepted as
IP address anymore.
2011-05-26 15:35:48 +02:00
Jean-Sébastien Pédron
98530d13a8
Extend accepted values to yes/no/on/off
...
Those values are defined in the YAML tag repository, not by the YAML 1.2
specifications.
2011-05-26 15:34:47 +02:00
Jean-Sébastien Pédron
5088f74e60
Add yaml_app and yaml_sup to Makefile.am
...
Those modules were not compiled...
2011-05-26 15:33:31 +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
b4f76e7819
New node modules
...
Those modules add standard tags/nodes, Erlang-specific nodes and a few
nodes specific to Yakaz. The latter will probably move to another place
or be standardized in any way.
2011-05-24 15:05:38 +02:00
Jean-Sébastien Pédron
22096bb951
Declare all node records
2011-05-24 15:04:55 +02:00
Jean-Sébastien Pédron
a8c526a02c
Declare new option "default_tags"
2011-05-24 15:03:52 +02:00
Jean-Sébastien Pédron
0c00ba974e
Declare the record #unfinished_node
2011-05-24 15:02:36 +02:00
Jean-Sébastien Pédron
b29f36e94d
Move data specification types to yaml_types.hrl
2011-05-24 15:01:07 +02:00
Jean-Sébastien Pédron
3f56c3e68a
Add yaml_app and yaml_sup modules
...
The yaml_app module is an application behaviour used to check the
configuration. The yaml_sup module is a supervisor behaviour only
included because an application must start a supervision tree.
2011-05-24 14:51:32 +02:00
Jean-Sébastien Pédron
5582f482d7
Support user-defined node modules.
...
If the node record isn't recognized, call ?NODE_MOD:node_pres/1.
This commits comes with several bugfixes too.
2011-05-24 14:41:49 +02:00