INN commit: trunk (3 files)
INN Commit
rra at isc.org
Tue Jan 6 19:32:23 UTC 2015
Date: Tuesday, January 6, 2015 @ 11:32:23
Author: iulius
Revision: 9777
Update to latest version of C TAP Harness
The runtests harness now supports ignoring comments and blank lines in
the test list specified with -l. Leading whitespace before the test
name is also ignored.
Also use the latest version of tests/docs/pod.t (no functional change).
Modified:
trunk/support/getc-tap-harness
trunk/tests/docs/pod.t
trunk/tests/runtests.c
--------------------------+
support/getc-tap-harness | 11 +++--------
tests/docs/pod.t | 31 +++++++++++++++++++++++++++----
tests/runtests.c | 12 +++++++++++-
3 files changed, 41 insertions(+), 13 deletions(-)
Modified: support/getc-tap-harness
===================================================================
--- support/getc-tap-harness 2015-01-04 21:50:49 UTC (rev 9776)
+++ support/getc-tap-harness 2015-01-06 19:32:23 UTC (rev 9777)
@@ -58,15 +58,10 @@
# our needs.
sed -i -e "3 i \\
# \$Id\$\\
-#\\
-# This file is part of C TAP Harness. The current version plus supporting\\
-# documentation is at <http://www.eyrie.org/~eagle/software/c-tap-harness/>.\\
#" \
- -e 's/C TAP Harness/INN/g' \
- -e '5,8d' \
- -e '10,11d' \
+ -e '5,9d' \
-e '/^use warnings;$/d' \
- -e "42 i \\
+ -e "62 i \\
\$Test::Pod::ignore_dirs{'.libs'} = 'Libs';\\
" \
-e "s/'docs'/'.'/g" \
@@ -215,7 +210,7 @@
download tests/tap/macros.h tests/tap macros.h
## Synchronize the POD checker test suite.
-download tests/docs/pod.t tests/docs pod.t
+download tests/docs/pod-t tests/docs pod.t
## Synchronize the README file from upstream.
download docs/writing-tests tests README
Modified: tests/docs/pod.t
===================================================================
--- tests/docs/pod.t 2015-01-04 21:50:49 UTC (rev 9776)
+++ tests/docs/pod.t 2015-01-06 19:32:23 UTC (rev 9777)
@@ -2,12 +2,30 @@
#
# $Id$
#
+# Test POD formatting.
+#
# This file is part of C TAP Harness. The current version plus supporting
# documentation is at <http://www.eyrie.org/~eagle/software/c-tap-harness/>.
#
-# Test POD formatting for INN documentation.
+# Copyright 2009, 2010, 2013, 2014 Russ Allbery <eagle at eyrie.org>
#
-# Copyright 2009, 2010, 2013 Russ Allbery <eagle at eyrie.org>
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
use 5.006;
use strict;
@@ -39,5 +57,10 @@
$Test::Pod::ignore_dirs{'.libs'} = 'Libs';
-# Test all the POD in the root directory.
-all_pod_files_ok(all_pod_files('.'));
+# Check spelling of everything in root if present, and any *.pod files in the
+# current directory.
+my @pod_files = glob('*.pod');
+if (-d '.') {
+ push(@pod_files, all_pod_files('.'));
+}
+all_pod_files_ok(@pod_files);
Modified: tests/runtests.c
===================================================================
--- tests/runtests.c 2015-01-04 21:50:49 UTC (rev 9776)
+++ tests/runtests.c 2015-01-06 19:32:23 UTC (rev 9777)
@@ -1176,6 +1176,7 @@
unsigned int line;
size_t length;
char buffer[BUFSIZ];
+ const char *testname;
struct testlist *listhead, *current;
/* Create the initial container list that will hold our results. */
@@ -1198,6 +1199,15 @@
exit(1);
}
buffer[length] = '\0';
+
+ /* Skip comments, leading spaces, and blank lines. */
+ testname = skip_whitespace(buffer);
+ if (strlen(testname) == 0)
+ continue;
+ if (testname[0] == '#')
+ continue;
+
+ /* Allocate the new testset structure. */
if (current == NULL)
current = listhead;
else {
@@ -1206,7 +1216,7 @@
}
current->ts = xcalloc(1, sizeof(struct testset));
current->ts->plan = PLAN_INIT;
- current->ts->file = xstrdup(buffer);
+ current->ts->file = xstrdup(testname);
}
fclose(file);
More information about the inn-committers
mailing list