doc: test-writing-guidelines: fixed the C test example
This example had some typos and other basic mistakes that prevented
it from being built.
Fixed it.
Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
diff --git a/doc/test-writing-guidelines.txt b/doc/test-writing-guidelines.txt
index 6e79d1a..91edbf0 100644
--- a/doc/test-writing-guidelines.txt
+++ b/doc/test-writing-guidelines.txt
@@ -218,6 +218,7 @@
*/
#include "test.h"
+#include "usctest.h"
char *TCID = "getenv01";
int TST_TOTAL = 2;
@@ -236,7 +237,7 @@
{
char *ret;
- ret = getenv(TEST_EVN);
+ ret = getenv(TEST_ENV);
if (ret) {
if (!strcmp(ret, TEST_ENV_VAL))
@@ -254,7 +255,7 @@
if (ret)
tst_resm(TFAIL, "getenv(" TEST_NE_ENV ") = '%s'", ret);
else
- tst_resm(TPASS, "getenv(" TEST_NE_ENV ")" = NULL);
+ tst_resm(TPASS, "getenv(" TEST_NE_ENV ") = NULL");
}
int main(int argc, char *argv[])
@@ -262,7 +263,7 @@
const char *msg;
int lc;
- if ((msg = parse_opts(argc, argv, NULL, NULL))
+ if ((msg = parse_opts(argc, argv, NULL, NULL)))
tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
setup();