]> git.ozlabs.org Git - ccan/blobdiff - ccan/tap/tap.3
io: fix another leak path for always array.
[ccan] / ccan / tap / tap.3
index 5395aef7aeb5fa4f8ceb8347e1f8aaee162c585b..6fc7c5c2b75577e77038cc18e3c55aa5b2d9eb45 100644 (file)
@@ -16,9 +16,9 @@ their success or failure.
 .Ss PRINTF STRINGS
 In the descriptions that follow, for any function that takes as the
 last two parameters
 .Ss PRINTF STRINGS
 In the descriptions that follow, for any function that takes as the
 last two parameters
-.Dq Fa char * , Fa ...
+.Dq Fa const char * , Fa ...
 it can be assumed that the
 it can be assumed that the
-.Fa char *
+.Fa const char *
 is a
 .Fn printf
 -like format string, and the optional arguments are values to be placed
 is a
 .Fn printf
 -like format string, and the optional arguments are values to be placed
@@ -35,7 +35,7 @@ in that string.
 .Xc
 .It Xo
 .Ft void
 .Xc
 .It Xo
 .Ft void
-.Fn plan_skip_all "char *" "..."
+.Fn plan_skip_all "const char *" "..."
 .Xc
 .El
 .Pp
 .Xc
 .El
 .Pp
@@ -74,7 +74,7 @@ the tests.
 .Bl -tag -width indent
 .It Xo
 .Ft unsigned int
 .Bl -tag -width indent
 .It Xo
 .Ft unsigned int
-.Fn ok "expression" "char *" "..."
+.Fn ok "expression" "const char *" "..."
 .Xc
 .It Xo
 .Ft unsigned int
 .Xc
 .It Xo
 .Ft unsigned int
@@ -82,11 +82,11 @@ the tests.
 .Xc
 .It Xo
 .Ft unsigned int
 .Xc
 .It Xo
 .Ft unsigned int
-.Fn pass "char *" "..."
+.Fn pass "const char *" "..."
 .Xc
 .It Xo
 .Ft unsigned int
 .Xc
 .It Xo
 .Ft unsigned int
-.Fn fail "char *" "..."
+.Fn fail "const char *" "..."
 .Xc
 .El
 .Pp
 .Xc
 .El
 .Pp
@@ -161,10 +161,10 @@ These are synonyms for ok(1, ...) and ok(0, ...).
 .Bl -tag -width indent
 .It Xo
 .Ft void
 .Bl -tag -width indent
 .It Xo
 .Ft void
-.Fn skip "unsigned int" "char *" "..."
+.Fn skip "unsigned int" "const char *" "..."
 .Xc
 .It Xo
 .Xc
 .It Xo
-.Fn skip_if "expression" "unsigned int" "char *" "..."
+.Fn skip_if "expression" "unsigned int" "const char *" "..."
 .Xc
 .El
 .Pp
 .Xc
 .El
 .Pp
@@ -204,7 +204,7 @@ skip_if(getuid() != 0, 1, "because test only works as root") {
 .Bl -tag -width indent
 .It Xo
 .Ft void
 .Bl -tag -width indent
 .It Xo
 .Ft void
-.Fn todo_start "char *" "..."
+.Fn todo_start "const char *" "..."
 .Xc
 .It Xo
 .Ft void
 .Xc
 .It Xo
 .Ft void
@@ -261,8 +261,8 @@ yet to fix, but want to put tests in your testing script
 .Ss DIAGNOSTIC OUTPUT
 .Bl -tag -width indent
 .It Xo
 .Ss DIAGNOSTIC OUTPUT
 .Bl -tag -width indent
 .It Xo
-.Fr void
-.Fn diag "char *" "..."
+.Fr int
+.Fn diag "const char *" "..."
 .Xc
 .El
 .Pp
 .Xc
 .El
 .Pp
@@ -273,6 +273,7 @@ It ensures that the output will not be considered by the TAP test harness.
 adds the necessary trailing
 .Dq \en
 for you.
 adds the necessary trailing
 .Dq \en
 for you.
+It returns the number of characters written.
 .Bd -literal -offset indent
 diag("Expected return code 0, got return code %d", rcode);
 .Ed
 .Bd -literal -offset indent
 diag("Expected return code 0, got return code %d", rcode);
 .Ed
@@ -284,7 +285,7 @@ diag("Expected return code 0, got return code %d", rcode);
 .Xc
 .El
 .Pp
 .Xc
 .El
 .Pp
-For maximum compatability your test program should return a particular
+For maximum compatibility your test program should return a particular
 exit code.  This is calculated by
 .Fn exit_status
 so it is sufficient to always return from
 exit code.  This is calculated by
 .Fn exit_status
 so it is sufficient to always return from
@@ -302,7 +303,7 @@ directory in the source distribution contains numerous tests of
 functionality, written using
 .Nm .
 Examine them for examples of how to construct test suites.
 functionality, written using
 .Nm .
 Examine them for examples of how to construct test suites.
-.Sh COMPATABILITY
+.Sh COMPATIBILITY
 .Nm
 strives to be compatible with the Perl Test::More and Test::Harness 
 modules.  The test suite verifies that
 .Nm
 strives to be compatible with the Perl Test::More and Test::Harness 
 modules.  The test suite verifies that