[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
11AT_KEYWORDS-without-commas.diff
From: |
derek |
Subject: |
11AT_KEYWORDS-without-commas.diff |
Date: |
Tue, 01 Apr 2003 23:05:41 +0000 |
This is a fix for a bug in AT_KEYWORDS that was preventing a second call from
working. The problem was that the comma being used as a field seperator ended
up wreaking havoc somewhere in m4_append_uniq on the second call to
AT_KEYWORDS.
I decided not to try and mess with the quoting in m4_append_uniq and
m4_append. I just changed the field seperator AT_KEYWORDS passes to those
functions to a space instead.
The AT_KEYWORDS change below addresses the above. The second part maybe
should have been a second patch, but it allows multiple invocations of
--keywords= to a testsuite and restricts keyword matches to whole keywords
unless maybe if the user passes a regexp to --keywords=.
Index: ChangeLog
2003-04-01 Derek Price <address@hidden>
* lib/autotest/general.m4 (AT_KEYWORDS): Don't use a comma as the
seperator with m4_append_uniq(). It doesn't work.
(AT_CLEANUP): Add `;' to end of at_help_all.
(AT_INIT): Allow --keyword to be specified more than once. When
grepping $at_help_all for keywords, use the field and keyword
seperators to ensure a complete keyword match.
--- autoconf-AT_ARG_OPTION/lib/autotest/general.m4 2003-04-01
17:47:23.000000000 -0500
+++ autoconf/lib/autotest/general.m4 2003-04-01 11:08:14.000000000 -0500
@@ -310,7 +310,7 @@
at_prev=--keywords
;;
--keywords=* )
- at_keywords=$at_optarg
+ at_keywords="$at_keywords,$at_optarg"
;;
m4_divert_pop([PARSE_ARGS])dnl
dnl Process *=* last to allow for user specified --option=* type arguments.
@@ -342,7 +342,7 @@
do
# It is on purpose that we match the test group titles too.
at_groups_selected=`echo "$at_groups_selected" |
- grep -i "^[[^;]]*;[[^;]]*;.*$at_keyword"`
+ grep -i "^[[^;]]*;[[^;]]*;.*[[; ]]$at_keyword[[ ;]]"`
done
at_groups_selected=`echo "$at_groups_selected" | sed 's/;.*//'`
# Smash the end of lines.
@@ -936,7 +936,7 @@
# ---------------------
# Declare a list of keywords associated to the current test group.
m4_define([AT_KEYWORDS],
-[m4_append_uniq([AT_keywords], [$1], [,])])
+[m4_append_uniq([AT_keywords], [$1], [ ])])
# AT_CLEANUP
@@ -944,7 +944,7 @@
# Complete a group of related tests.
m4_define([AT_CLEANUP],
[m4_append([AT_help],
-at_help_all=$at_help_all'm4_defn([AT_ordinal]);m4_defn([AT_line]);m4_defn([AT_description]);m4_ifdef([AT_keywords],
[m4_defn([AT_keywords])])
+at_help_all=$at_help_all'm4_defn([AT_ordinal]);m4_defn([AT_line]);m4_defn([AT_description]);m4_ifdef([AT_keywords],
[m4_defn([AT_keywords])]);
'
)dnl
$at_times_skip || times >$at_times_file
- 11AT_KEYWORDS-without-commas.diff,
derek <=