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-709-


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-709-g95ce684
Date: Wed, 16 Feb 2011 12:21:36 +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=95ce684f09a47df6fc165311c5372066e0e28f9f

The branch, master has been updated
       via  95ce684f09a47df6fc165311c5372066e0e28f9f (commit)
       via  a118732d1138b169e3c41759b8e3e03945994172 (commit)
      from  95b717e8bd43406afc81bc5f6ebeef8b81da970c (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 95ce684f09a47df6fc165311c5372066e0e28f9f
Merge: 95b717e a118732
Author: Stefano Lattarini <address@hidden>
Date:   Wed Feb 16 13:00:59 2011 +0100

    Merge branch 'maint'

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

Summary of changes:
 ChangeLog              |    7 +++++++
 tests/defs             |   18 ++++++++++++++++++
 tests/instspc-tests.sh |    5 -----
 3 files changed, 25 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c3ff53b..12b8e9f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-02-16  Stefano Lattarini  <address@hidden>
+           Ralf Wildenhues  <address@hidden>
+
+       test defs: add subroutine for input unindenting
+       * tests/defs.in (unindent): New subroutine.
+       * tests/instspc-tests.sh: Use it.
+
 2011-02-15  Stefano Lattarini  <address@hidden>
 
        python: report the 'PYTHON' influential environment variable
diff --git a/tests/defs b/tests/defs
index 4e27788..a32ef15 100644
--- a/tests/defs
+++ b/tests/defs
@@ -146,6 +146,24 @@ AUTOMAKE_fails ()
   AUTOMAKE_run 1 ${1+"$@"}
 }
 
+# unindent [input files...]
+# -------------------------
+# Remove the "proper" amount of leading whitespace from the given files,
+# and output the result on stdout.  That amount is determined by looking
+# at the leading whitespace of the first non-blank line in the input
+# files.  If no input file is specified, standard input is implied.
+unindent ()
+{
+  cat ${1+"$@"} > deindent.tmp
+  indentation=`sed <deindent.tmp -n "
+    /[^ $tab].*$/{
+      s///p
+      q
+  }"`
+  sed "s/^$indentation//" deindent.tmp
+  rm -f deindent.tmp
+}
+
 
 ## ----------------------------------------------------------- ##
 ##  Checks for required tools, and additional setups (if any)  ##
diff --git a/tests/instspc-tests.sh b/tests/instspc-tests.sh
index 981365f..2c4089f 100755
--- a/tests/instspc-tests.sh
+++ b/tests/instspc-tests.sh
@@ -101,11 +101,6 @@ define_problematic_string ()
 
 # Helper subroutines for creation of input data files.
 
-unindent ()
-{
-  sed 's/^ *//' # we don't strip leading tabs -- this is deliberate!
-}
-
 create_input_data ()
 {
   mkdir sub


hooks/post-receive
-- 
GNU Automake



reply via email to

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