shell-unittest(3)
appendTests, assertEquals, assertFalse, assertNotEquals, assertNotNull, assertNotSame, assertNull, assertSame, assertTrue, messageTest, registerTests, runUnitTests, setUp, setUpTests, shouldSkip, showSummary, tearDown, tearDownTests
- appendTests funcion_name
- registerTests [/tests-file]
- assertEquals [comment] expected actual
- assertFalse [comment] condition
- assertFalse [comment] integer
- assertNotEquals [comment] expected actual
- assertNotNull [comment] value
- assertNotSame [comment] expected actual
- assertNull [comment] value
- assertSame [comment] expected actual
- assertTrue [comment] condition
- assertTrue [comment] integer
- messageTest test-case test-message test-return-code
- runUnitTests
- setUp
- setUpTests
- shouldSkip
- showSummary
- tearDown
- tearDownTests
Unit testing framework for shell. The module was supposed to be compatible with xUnit.
Function registers new testing function.
Function automatically registeres test functions with 'UnitTest' comment. The name of current shell script will be used if argument is not present.
Example:
my_testcase_function() # UnitTest
{
blah blah blah ...
}
Asserts that two arguments are equal to one another. (called in testing function)
Asserts that a given shell test condition (or integer) is false. (called in testing function)
Asserts that two arguments are not equal to one another. (called in testing function)
Asserts that argument is not empty string. (called in testing function)
Asserts that two arguments are not same. (called in testing function)
Asserts that argument is a zero-length string. (called in testing function)
Asserts that two arguments are same. (called in testing function)
Asserts that a given shell test condition (or integer) is true. (called in testing function)
Skip test (called in testing function)
Function displays status message after each test.
Function would be called before each test is run.
Function would be called before all test is run.
Function displays summary statistic: how many tests passed and how many failed.
Function would be called after each test is run.
Function would be called after all test is run.
Function calls tests one by one and calls the function described above.
TESTCASES - Only perform listed tests.
unittest_use_color - Use color messages to show status.
unittest_show_condition - Append tests condition to comment message if test failed.
Authors and contributors of the programs included in the libshell package are listed in the COPYING file.
Report bugs to the authors.