You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Francisco Vilmar Cardoso Ruviaro 880e903c45
Update testcases to work with current Check API
3 months ago
..
mock_paths/test_nc_v6_interface_configured_simple Fix up test suite to pass again 8 years ago
README Add missing instructions to test/README 8 years ago
srunner.c Update testcases to work with current Check API 3 months ago
srunner.h Fix up test suite to pass again 8 years ago
test_inet_mton.c Update testcases to work with current Check API 3 months ago
test_inet_ptom.c Update testcases to work with current Check API 3 months ago
test_nc_v6_interface_configured.c Update testcases to work with current Check API 3 months ago
test_netcfg_gateway_reachable.c Update testcases to work with current Check API 3 months ago
test_netcfg_network_address.c Update testcases to work with current Check API 3 months ago
test_netcfg_parse_cidr_address.c Update testcases to work with current Check API 3 months ago
tests.mk test/tests.mk: Link against libsubunit. 5 years ago

README

This is the test suite for netcfg.  At present, it is no more than a set of
regression tests to ensure that refactoring and other invasive changes don't
break existing functionality more than can be helped.

Since the test suite does not comprehensively cover the entire codebase, it
should not be run at package build time. It is a development aid *only*.


Running the tests
-----------------

Ensure you have the 'check' package installed, and run 'make test'.
Everything should sort itself out from there automatically.


Adding tests
------------

See http://check.sourceforge.net/doc/check_html/index.html for documentation
on how to use Check (the unit testing tool in use).

Tests are grouped in files named after the function they test, prepended
with 'test_' and with the standard '.c' suffix. So tests for the inet_mton
function go in 'test_inet_mton.c'.

To add a new test for a function with existing tests, create a new test case
in the appropraite file (see existing tests for an idea of the structure),
then add a new 'tcase_add_test' line to the 'suite' function at the bottom
of the file.

To add tests for a function that doesn't already have tests, make a new
file, create a new skeleton matching that of an existing test file, add an
entry in the TESTS list in test/tests.mk, and then add a prototype for the
suite function to srunner.h and an 'srunner_add_suite' line in srunner.c.
Simple!