m4-patches
[Top][All Lists]
Advanced

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

head - more frozen file tests


From: Eric Blake
Subject: head - more frozen file tests
Date: Fri, 07 Jul 2006 07:25:30 -0600
User-agent: Thunderbird 1.5.0.4 (Windows/20060516)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I propose adding this to the testsuite; it currently fails, but must pass
before we can release m4 2.0.  Otherwise, if you install autoconf with
frozen files generated by 1.4.x, then upgrade m4, autoconf will break
because m4 2.0 can't reload the frozen files.  Any comments before I commit?

I am also thinking that this file will make a great place to add tests
like freezing m4wrap and sysval state.  I haven't yet written those tests,
but am thinking of first writing a helper macro to ease the job:
# AT_CHECK_M4_FROZEN(DATA1, DATA2, [ARGS = `'])
# ---------------------------------------------
# Create file1 with contents DATA1, file2 with contents DATA2, then
# validate that `m4 ARGS file1 file2' gives the same stdout, stderr,
# and result, as `m4 ARGS -F file1f file1; m4 ARGS -R file1f file2'.

However, I've also been wondering whether we should reject some
combinations of -R and other options.  For example, does it make sense to
support -R -Dfoo?  Or should we claim that all options that affect state
are invalid in combination with -R, since the state should instead be set
by virtue of the reloaded state?  It could certainly make implementation
easier (even your new -r option to set resyntax would qualify as something
incompatible with -R).

2006-07-07  Eric Blake  <address@hidden>

        * tests/freeze.at: New file.
        * tests/testsuite.at: Include it.
        * tests/macros.at (Arity, defn, and freeze): Add frozen keyword.
        * tests/modules.at (Freezing modules): Likewise.

- --
Life is short - so eat dessert first!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFErmDK84KuGfSFAYARAn21AJ9Xz56azWI4eFYOLGjktBKM36L9rACfSnBy
6fabgnBC/B2zAETT+WEGJjU=
=bYFT
-----END PGP SIGNATURE-----
? tests/freeze.at
Index: tests/macros.at
===================================================================
RCS file: /sources/m4/m4/tests/macros.at,v
retrieving revision 1.3
diff -u -p -r1.3 macros.at
--- tests/macros.at     1 May 2005 11:10:06 -0000       1.3
+++ tests/macros.at     7 Jul 2006 13:22:35 -0000
@@ -1,5 +1,5 @@
 # Hand crafted tests for GNU M4.                               -*- Autotest -*-
-# Copyright 2001 Free Software Foundation, Inc.
+# Copyright 2001, 2006 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -69,6 +69,7 @@ AT_CLEANUP
 ## ------------------------- ##
 
 AT_SETUP([Arity, defn, and freeze])
+AT_KEYWORDS([frozen])
 
 AT_DATA([[freezeme.m4]],
 [[define(`defun', defn(`define'))dnl
Index: tests/modules.at
===================================================================
RCS file: /sources/m4/m4/tests/modules.at,v
retrieving revision 1.13
diff -u -p -r1.13 modules.at
--- tests/modules.at    5 Jul 2006 20:54:15 -0000       1.13
+++ tests/modules.at    7 Jul 2006 13:22:35 -0000
@@ -25,6 +25,7 @@ AT_BANNER([Module support.])
 ## --------- ##
 
 AT_SETUP([Freezing modules])
+AT_KEYWORDS([frozen])
 
 AT_DATA([[frozen.m4]],
 [[divert(1)dnl
Index: tests/testsuite.at
===================================================================
RCS file: /sources/m4/m4/tests/testsuite.at,v
retrieving revision 1.17
diff -u -p -r1.17 testsuite.at
--- tests/testsuite.at  1 May 2005 11:10:06 -0000       1.17
+++ tests/testsuite.at  7 Jul 2006 13:22:35 -0000
@@ -1,7 +1,7 @@
 # Process with autom4te to create an -*- Autotest -*- test suite.
 
 # Test suite for GNU M4.
-# Copyright 2001 Free Software Foundation, Inc.
+# Copyright 2001, 2006 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -58,6 +58,9 @@ m4_include([builtins.at])
 # Options.
 m4_include([options.at])
 
+# Frozen files.
+m4_include([freeze.at])
+
 # Hand crafted tests.
 m4_include([others.at])
 

reply via email to

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