automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-1860


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-1860-gb2c1adf
Date: Tue, 14 Feb 2012 20:30:40 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=b2c1adfe1e118ed8fb5fc68ced68ef69ea39b543

The branch, master has been updated
       via  b2c1adfe1e118ed8fb5fc68ced68ef69ea39b543 (commit)
      from  ff8269e114bcee4070b8837c1e8715dd5c22d04f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b2c1adfe1e118ed8fb5fc68ced68ef69ea39b543
Author: Stefano Lattarini <address@hidden>
Date:   Tue Feb 14 21:23:04 2012 +0100

    check: fix test-suite.log formatting with NetBSD sed
    
    * lib/am/check.am (am__rst_section): Tweak to ensure en extra final
    newline is printed also with NetBSD sed.  Issue revealed by a
    failure of 'test-metadata-global-result.test'.
    * tests/rst-formatting.test: New test, checking the internal
    variables '$(am__rst_title)' and '$(am__rst_section)'.
    * tests/list-of-tests.mk: Add it.

-----------------------------------------------------------------------

Summary of changes:
 lib/am/check.am           |    4 +-
 tests/list-of-tests.mk    |    1 +
 tests/rst-formatting.test |   93 +++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 96 insertions(+), 2 deletions(-)
 create mode 100755 tests/rst-formatting.test

diff --git a/lib/am/check.am b/lib/am/check.am
index 777cb6f..bd9f5c2 100644
--- a/lib/am/check.am
+++ b/lib/am/check.am
@@ -57,8 +57,8 @@ include inst-vars.am
 ## (among them, TAP).
 
 # Restructured Text title and section.
-am__rst_title = sed 's/.*/   &   /;h;s/./=/g;p;x;p;g;p;s/.*//'
-am__rst_section = sed 'p;s/./=/g;p;g'
+am__rst_title = { sed 's/.*/   &   /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
+am__rst_section = { sed 'p;s/./=/g;' && echo; }
 
 # Solaris 10 'make', and several other traditional 'make' implementations,
 # pass "-e" to $(SHELL), and POSIX 2008 even requires this.  Work around it
diff --git a/tests/list-of-tests.mk b/tests/list-of-tests.mk
index d2ad678..c726bde 100644
--- a/tests/list-of-tests.mk
+++ b/tests/list-of-tests.mk
@@ -880,6 +880,7 @@ req.test \
 reqd.test \
 reqd2.test \
 repeated-options.test \
+rst-formatting.test \
 rulepat.test \
 self-check-cleanup.tap \
 self-check-configure-help.test \
diff --git a/tests/rst-formatting.test b/tests/rst-formatting.test
new file mode 100755
index 0000000..ad80aff
--- /dev/null
+++ b/tests/rst-formatting.test
@@ -0,0 +1,93 @@
+#! /bin/sh
+# Copyright (C) 2012 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Parallel testsuite harness: check APIs for the registering the
+# "global test result" in `*.trs' files, as documented in the automake
+# manual.
+
+am_create_testdir=empty
+. ./defs || Exit 1
+
+sed -n '/^am__rst_[a-z_][a-z_]* =/p' "$am_amdir"/check.am > Makefile \
+  || framework_failure_ "fetching definitions from check.am"
+
+cat >> Makefile << 'END'
+test:
+       printf '%s\n' "$$in" | $(am__rst_title) > title-got
+       printf '%s\n' "$$in" | $(am__rst_section) > section-got
+       cat title-exp
+       cat title-got
+       diff title-exp title-got
+       cat section-exp
+       cat section-got
+       diff section-exp section-got
+END
+
+# -------------------------------------------------------------------------
+
+cat > title-exp <<'END'
+==============
+   ab cd ef
+==============
+
+END
+
+cat > section-exp <<'END'
+ab cd ef
+========
+
+END
+
+env in='ab cd ef' $MAKE test
+
+# -------------------------------------------------------------------------
+
+cat > title-exp <<'END'
+============================================================================
+   0123456789012345678901234567890123456789012345678901234567890123456789
+============================================================================
+
+END
+
+cat > section-exp <<'END'
+0123456789012345678901234567890123456789012345678901234567890123456789
+======================================================================
+
+END
+
+in=0123456789012345678901234567890123456789012345678901234567890123456789
+env in=$in $MAKE test
+
+# -------------------------------------------------------------------------
+
+cat > title-exp <<'END'
+=======
+   x
+=======
+
+END
+
+cat > section-exp <<'END'
+x
+=
+
+END
+
+env in=x $MAKE test
+
+# -------------------------------------------------------------------------
+
+:


hooks/post-receive
-- 
GNU Automake



reply via email to

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