m4-patches
[Top][All Lists]
Advanced

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

08-autotest-generated.patch


From: Akim Demaille
Subject: 08-autotest-generated.patch
Date: Fri, 17 Aug 2001 13:47:50 +0200

Index: ChangeLog
from  Akim Demaille  <address@hidden>

        * doc/m4.texinfo (Esyscmd): Fix the paths in the Vice example.
        (M4exit): Tag the exit status of the example.
        * tests/get-them: Adjust.
        * tests/generate.awk: New, based on get-them.
        * tests/Makefile.am: Adjust to generate `generated.at'.
        * tests/testsuite.at: Adjust.
        (AT_CHECK_M4): Don't overquote.  Blush...

Index: doc/m4.texinfo
--- doc/m4.texinfo Thu, 16 Aug 2001 13:02:57 +0200 akim
+++ doc/m4.texinfo Fri, 17 Aug 2001 10:17:59 +0200 akim
@@ -3431,11 +3431,11 @@ @node Esyscmd
 arguments.
 @end deffn
 
-Assume you are positioned into the @file{checks} directory of GNU
address@hidden distribution, then:
+Assume you are positioned into the @file{tests} directory of GNU M4
+distribution, then:
 
 @example
-define(`vice', `esyscmd(grep Vice ../Makefile)')
+define(`vice', `esyscmd(grep Vice Makefile)')
 @result{}
 vice
 @result{}#  Ty Coon, President of Vice
@@ -3565,6 +3565,7 @@ @node M4exit
 zero.
 @end deffn
 
address@hidden status: 1
 @example
 define(`fatal_error', `errprint(`m4: '__file__: __line__`: fatal error: $*
 ')m4exit(1)')
Index: tests/Makefile.am
--- tests/Makefile.am Fri, 17 Aug 2001 08:47:41 +0200 akim
+++ tests/Makefile.am Fri, 17 Aug 2001 11:05:04 +0200 akim
@@ -153,18 +153,22 @@
 check: stamp-TESTS
 
 stamp-TESTS: $(srcdir)/get-them $(top_srcdir)/doc/m4.texinfo
-       cd $(srcdir) \
-       && AWK=$(AWK) ./get-them ../doc/m4.texinfo \
-       && > $@
+       cd $(srcdir) && AWK=$(AWK) ./get-them ../doc/m4.texinfo
+       > $(srcdir)/$@
 
 clean-local:
        rm -rf testSubDir
 
-TESTSUITE_SOURCES = testsuite.at others.at
+TESTSUITE_SOURCES = testsuite.at others.at generated.at
 TESTSUITE = testsuite
 
 check-local: atconfig $(TESTSUITE)
        $(SHELL) $(TESTSUITE)
+
+$(srcdir)/generated.at: $(srcdir)/generate.awk $(top_srcdir)/doc/m4.texinfo
+       rm -f $@
+       $(AWK) -f $(srcdir)/generate.awk $(top_srcdir)/doc/m4.texinfo 
>address@hidden
+       mv address@hidden $@
 
 # FIXME: Autom4te is not complete yet, and lacks a means to find
 # the lib files.
Index: tests/testsuite.at
--- tests/testsuite.at Fri, 17 Aug 2001 08:47:41 +0200 akim
+++ tests/testsuite.at Fri, 17 Aug 2001 09:42:26 +0200 akim
@@ -21,7 +21,7 @@
 # AT_CHECK_M4(FLAGS, [EXIT-STATUS = 0], STDOUT, STDERR)
 # -----------------------------------------------------
 m4_define([AT_CHECK_M4],
-[AT_CHECK([[M4PATH=$srcdir:$srcdir/../examples $M4 -M ../../modules -d $1]],
+[AT_CHECK([M4PATH=$srcdir:$srcdir/../examples $M4 -M ../../modules -d $1],
           [m4_default([$2], [0])],
           [$3], [stderr])
 AT_CHECK([[sed 's,^[^:]*[lt-]*m4[.ex]*:,m4:,' stderr >&2]], 0, [], [$4])
@@ -32,3 +32,4 @@ m4_define([AT_CHECK_M4],
 AT_INIT([$M4])
 
 m4_include([others.at])
+m4_include([generated.at])
Index: tests/get-them
--- tests/get-them Thu, 16 Aug 2001 17:25:17 +0200 akim
+++ tests/get-them Fri, 17 Aug 2001 09:55:52 +0200 akim
@@ -106,6 +106,10 @@
       gsub("@}", "}", thearray[j]);
       gsub("@@", "@", thearray[j]);
       gsub("@comment.*", "", thearray[j]);
+      gsub("@comment.*", "", thearray[j]);
+      # other-tests are run one level deeper than announced.
+      # See the Esyscmd node in the documentation.
+      gsub (" Makefile", "../Makefile", thearray[j]);
       printf ("%s\n", thearray[j]) >> file;
     }
     printf ("EOF\n") >> file;



reply via email to

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