autoconf-commit
[Top][All Lists]
Advanced

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

[SCM] GNU Autoconf source repository branch, master, updated. v2.63-189-


From: Ralf Wildenhues
Subject: [SCM] GNU Autoconf source repository branch, master, updated. v2.63-189-g1b1851e
Date: Wed, 12 Nov 2008 22:54:33 +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 Autoconf source repository".

http://git.sv.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=1b1851ea3a819b82f340854e511eb89da23c20e7

The branch, master has been updated
       via  1b1851ea3a819b82f340854e511eb89da23c20e7 (commit)
      from  2e553335618ffb89502b2e14612f89e5d05b53a4 (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 1b1851ea3a819b82f340854e511eb89da23c20e7
Author: Ralf Wildenhues <address@hidden>
Date:   Wed Nov 12 23:54:01 2008 +0100

    Wrap keywords in `testsuite --list' output.
    
    * lib/autotest/general.m4 (AT_INIT): Rewrite --list awk script,
    avoid lint warnings from gawk, wrap keyword lists to stay below
    80 characters per line if possible.
    * tests/autotest.at (Keyword wrapping): New test.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

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

Summary of changes:
 ChangeLog               |    6 ++++++
 lib/autotest/general.m4 |   26 +++++++++++++++++++++++---
 tests/autotest.at       |   28 ++++++++++++++++++++++++++++
 3 files changed, 57 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 488d382..2a05748 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2008-11-12  Ralf Wildenhues  <address@hidden>
 
+       Wrap keywords in `testsuite --list' output.
+       * lib/autotest/general.m4 (AT_INIT): Rewrite --list awk script,
+       avoid lint warnings from gawk, wrap keyword lists to stay below
+       80 characters per line if possible.
+       * tests/autotest.at (Keyword wrapping): New test.
+
        * tests/local.at (AT_COPYRIGHT): Bump copyright years.
 
        * doc/autoconf.texi (Conditional constructs, Macro Names): Fix
diff --git a/lib/autotest/general.m4 b/lib/autotest/general.m4
index a4eb86d..e497c02 100644
--- a/lib/autotest/general.m4
+++ b/lib/autotest/general.m4
@@ -703,13 +703,33 @@ _ATEOF
   AS_ECHO(["$at_groups$as_nl$at_help_all"]) |
     awk 'BEGIN { FS = ";" }
         NR == 1 {
-          for (n = split($ 0, a, " "); n; n--) selected[[a[n]]] = 1
+          for (n = split ($ 0, a, " "); n; n--)
+            selected[[a[n]]] = 1
           next
         }
-        {
+        NF > 0 {
           if (selected[[$ 1]]) {
             printf " %3d: %-18s %s\n", $ 1, $ 2, $ 3
-            if ($ 4) printf "      %s\n", $ 4
+            if ($ 4) {
+              lmax = 79
+              indent = "     "
+              line = indent
+              len = length (line)
+              n = split ($ 4, a, " ")
+              for (i = 1; i <= n; i++) {
+                l = length (a[[i]]) + 1
+                if (i > 1 && len + l > lmax) {
+                  print line
+                  line = indent " " a[[i]]
+                  len = length (line)
+                } else {
+                  line = line " " a[[i]]
+                  len += l
+                }
+              }
+              if (n)
+                print line
+            }
           }
         }' || at_write_fail=1
   exit $at_write_fail
diff --git a/tests/autotest.at b/tests/autotest.at
index 4361d07..d674c81 100644
--- a/tests/autotest.at
+++ b/tests/autotest.at
@@ -781,6 +781,34 @@ AT_CHECK_KEYS([--list -k none -k first], [none|first], 
[2], [second|both], [0])
 AT_CLEANUP
 
 
+## ----------------- ##
+## Keyword wrapping. ##
+## ----------------- ##
+AT_SETUP([Keyword wrapping])
+
+AT_CHECK_AT_PREP([k],
+[[AT_INIT
+AT_SETUP([test])
+AT_KEYWORDS([a1 b1 c1 d1 e1 f1 g1 h1 i1 j1 k1 l1 m1 n1 o1 p1 q1 r1 s1 t1])
+AT_KEYWORDS([u1 v1 w1 x1 y1 z1])
+AT_KEYWORDS([a b c d e f g h i j k l m n o p q r s t u v w x y z])
+AT_CLEANUP
+AT_SETUP([test with long keywords])
+AT_KEYWORDS(
+[this-is-a-long-keyword-that-cannot-be-wrapped-so-we-exceed-the-length-limit-here])
+# surrounded by short ones
+AT_KEYWORDS([s])
+AT_KEYWORDS(
+[another-very-long-keyword-that-hits-the-line-length-limit-bla-bla-bla-bla])
+AT_KEYWORDS([t])
+AT_CLEANUP
+]])
+
+AT_CHECK_KEYS([-l], [.{80}], [1], [.{87}], [0])
+
+AT_CLEANUP
+
+
 ## ----------------------- ##
 ## parallel test execution ##
 ## ----------------------- ##


hooks/post-receive
--
GNU Autoconf source repository




reply via email to

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