MySQL 5.6.14 Source Code Document
|
This is an simple example of how to write a test using the library. The output of this program is:
The basic structure is: plan the number of test points using the plan() function, perform the test and write out the result of each test point using the ok() function, print out a diagnostics message using diag(), and report the result of the test by calling the exit_status() function. Observe that this test does excessive testing (see Writing unnecessarily large tests), but the test point doesn't take very long time.