docs: spellfixes

Pointed by the new CI job
This commit is contained in:
Daniel Stenberg 2022-09-20 23:30:19 +02:00
parent 72c41f7c8b
commit fd1ce3d4b0
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
188 changed files with 1203 additions and 1208 deletions

View file

@ -33,7 +33,7 @@ start up gdb and run the same case using that.
## Write Unit Tests
We put tests that focus on an area or a specific function into a single C
source file. The source file should be named 'unitNNNN.c' where NNNN is a
source file. The source file should be named `unitNNNN.c` where `NNNN` is a
previously unused number.
Add your test to `tests/unit/Makefile.inc` (if it is a unit test). Add your
@ -45,28 +45,29 @@ and the `tests/FILEFORMAT.md` documentation.
For the actual C file, here's a simple example:
~~~c
#include "curlcheck.h"
#include "a libcurl header.h" /* from the lib dir */
#include "curlcheck.h"
static CURLcode unit_setup( void )
{
/* whatever you want done first */
return CURLE_OK;
}
#include "a libcurl header.h" /* from the lib dir */
static void unit_stop( void )
{
/* done before shutting down and exiting */
}
static CURLcode unit_setup( void )
{
/* whatever you want done first */
return CURLE_OK;
}
UNITTEST_START
static void unit_stop( void )
{
/* done before shutting down and exiting */
}
/* here you start doing things and checking that the results are good */
UNITTEST_START
fail_unless( size == 0 , "initial size should be zero" );
fail_if( head == NULL , "head should not be initiated to NULL" );
/* here you start doing things and checking that the results are good */
/* you end the test code like this: */
fail_unless( size == 0 , "initial size should be zero" );
fail_if( head == NULL , "head should not be initiated to NULL" );
UNITTEST_STOP
/* you end the test code like this: */
UNITTEST_STOP