Yousong Zhou a6a745338c tests: add test case for parsing long option values. 9 lat temu
..
config 25b34febb4 ucimap: add helper function for resizing lists and freeing items (both using ucimap internal allocation list), add test coverage for config change operations 15 lat temu
references a2bbe06ed1 tests: add test coverage for comment lines within batch commands. 9 lat temu
shunit2 a51c515dc1 Adds a unit test framework based on shunit2 16 lat temu
tests.d a6a745338c tests: add test case for parsing long option values. 9 lat temu
Makefile a51c515dc1 Adds a unit test framework based on shunit2 16 lat temu
README a51c515dc1 Adds a unit test framework based on shunit2 16 lat temu
tests.sh 37930de695 tests: add test cases for showing nonexistent section and option. 9 lat temu

README

This test script uses shunit2 :
http://code.google.com/p/shunit2/

uci-static binary is used during tests.


How to add a test
=================

* Test files are located in './test/tests.d'

* These files contain shell functions beginning with 'test' :
"
test_get_option ()
{
...
}
...
"

* shunit2 functions can be used in these functions :
http://shunit2.googlecode.com/svn/trunk/source/2.1/doc/shunit2.html

* Additional environment variables are available :
- ${CONFIG_DIR} : uci search path for config files. This directory is
reset after each test.
- ${CHANGES_DIR} : uci search path for config change files. This directory is
reset after each test.
- ${TMP_DIR} : path to a directory where can be stored temporary files
during tests. This directory is reset after each test.
- ${UCI} : uci static binary called with above config and changes
directories as parameters.
- ${REF_DIR} : path to a directory where can be stored reference files
or data.