autoconf-archive-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patch #8492] New: autotest AX_AT_CHECK_PATTERN() and AX_AT_DIFF_PATTERN


From: Luke Mewburn
Subject: [patch #8492] New: autotest AX_AT_CHECK_PATTERN() and AX_AT_DIFF_PATTERN()
Date: Wed, 02 Jul 2014 23:08:11 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Firefox/24.0

URL:
  <http://savannah.gnu.org/patch/?8492>

                 Summary: New: autotest AX_AT_CHECK_PATTERN() and
AX_AT_DIFF_PATTERN()
                 Project: GNU Autoconf Archive
            Submitted by: lukemewburn
            Submitted on: Thu 03 Jul 2014 09:08:10 AM EST
                Priority: 5 - Normal
                  Status: None
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

I've implemented two macros for autotest:

AX_AT_CHECK_PATTERN(COMMANDS, [STATUS], [STDOUT-RE], [STDERR-RE],
[RUN-IF-FAIL], [RUN-IF-PASS])

AX_AT_DIFF_PATTERN(PATTERN-FILE, TEST-FILE, [STATUS=0], [DIFFERENCES])


AX_AT_CHECK_PATTERN() executes a test similar to AT_CHECK(), except
that stdout and stderr are awk regular expressions (REs).

NOTE: as autoconf uses [] for quoting, the use of [brackets] in the RE
arguments STDOUT-RE and STDERR-RE can be awkward and require careful
extra quoting, or quadrigraphs '@<:@' (for '[') and '@:>@' (for ']').

awk is invoked via $AWK, which defaults to "awk" if unset or empty.

Implemented using AT_CHECK() with a custom value for $at_diff that
invokes diff with an awk post-processor.


AX_AT_DIFF_PATTERN() checks that the PATTERN-FILE applies to TEST-FILE.
If there are differences, STATUS will be 1 and they should be DIFFERENCES.


I provide both the m4 source as well as a distribution tarball which contains
a testsuite as well.
The testsuite has some examples how to use the macros.
The testsuite could be incorporated into any existing autoconf-archive
testsuite.


Luke.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Thu 03 Jul 2014 09:08:10 AM EST  Name: ax_at_check_pattern.m4  Size: 3kB
  By: lukemewburn
macro file, distribution archive.
<http://savannah.gnu.org/patch/download.php?file_id=31668>
-------------------------------------------------------
Date: Thu 03 Jul 2014 09:08:10 AM EST  Name: ax_at_check_pattern-3.tar.gz 
Size: 74kB   By: lukemewburn
macro file, distribution archive.
<http://savannah.gnu.org/patch/download.php?file_id=31669>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?8492>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]