commit-mailutils
[Top][All Lists]
Advanced

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

[SCM] GNU Mailutils branch, master, updated. release-2.2-186-gc022017


From: Sergey Poznyakoff
Subject: [SCM] GNU Mailutils branch, master, updated. release-2.2-186-gc022017
Date: Thu, 11 Nov 2010 13:33:01 +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 Mailutils".

http://git.savannah.gnu.org/cgit/mailutils.git/commit/?id=c02201707fd4664252ba0e3fe93d3018ec816c89

The branch, master has been updated
       via  c02201707fd4664252ba0e3fe93d3018ec816c89 (commit)
       via  13c9419319e80c8c4967fa147ee910a5a8e7f3f1 (commit)
      from  2662827ca1abe42442d14cc3cbf08d076b3ee1ab (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 c02201707fd4664252ba0e3fe93d3018ec816c89
Author: Sergey Poznyakoff <address@hidden>
Date:   Thu Nov 11 14:10:31 2010 +0200

    anno: Minor improvements.
    
    * mh/mh_init.c (mh_init): Make sure stdin is open.
    * mh/anno.c (main): Use mu_stream_t to read the answer from stdin.
    Do not display prompt if stdin is not connected to a tty.
    * mh/tests/anno.at: New testcase.
    * mh/tests/Makefile.am (TESTSUITE_AT): Add anno.at
    * mh/tests/testsuite.at: Include anno.at.
    
    * doc/texinfo/mu-mh.texi: Document the changes in the behavior of anno.

commit 13c9419319e80c8c4967fa147ee910a5a8e7f3f1
Author: Sergey Poznyakoff <address@hidden>
Date:   Thu Nov 11 11:56:49 2010 +0200

    mhl: Improve backward compatibility.  Provide a test case.
    
    Mhl now accepts the traditional use of "ignores=", i.e. as a single
    statement on a line and without double-quotes around the argument.
    
    Additional quotes around variable values are not needed in most
    cases.
    
    The name of a component is not printed if that component is not
    present.
    
    The offset variable works as in MH and nmh.
    
    * mh/mh_list.c (parse_variable): Accept traditional use of
    "ignores=", as a single statement on a line, without double-quotes around
    the argument.
    (mhl_format_compile): Use mu_streams instead of FILE.
    Fix line counting.
    (header_is_printed, want_header): Last argument is const char *.
    (ovf_print): Move to the specified offset no matter what the value
    of prefix is.
    (print_component_name): New function.
    (eval_component): Call print_component_name and newline, if necessary
    (eval_body): Likewise.
    (eval_extras): Likewise.
    (eval_comp): Do not print component name, leave that to the called
    function.  Ditto for the trailing newline.
    * mh/mhl.c: Ignore empty moreproc value.
    * mh/mhl.format: Remove extra double-quotes.
    
    * mh/tests/mhl.at: New testcase.
    * mh/tests/Makefile.am (TESTSUITE_AT): Add mhl.at
    * mh/tests/testsuite.at: Include mhl.at
    
    * libmailutils/string/wordsplit.c (scan_qstring): Force _WSNF_EMPTYOK.
    (mu_wordsplit_len): Make sure the tail element is not joinable
    * libmailutils/tests/wordsplit.at: Test these changes.
    
    * doc/texinfo/mu-mh.texi: Update the description of mhl.

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

Summary of changes:
 doc/texinfo/mu-mh.texi                      |   34 ++++++-
 libmailutils/string/wordsplit.c             |    5 +-
 libmailutils/tests/wordsplit.at             |   16 +++-
 mh/anno.c                                   |   36 +++++++-
 mh/mh_init.c                                |   10 ++
 mh/mh_list.c                                |  128 +++++++++++++++------------
 mh/mhl.c                                    |    2 +-
 mh/mhl.format                               |    6 +-
 mh/tests/Makefile.am                        |    2 +
 mh/tests/anno.at                            |   62 +++++++++++++
 maidag/tests/url-mbox.at => mh/tests/mhl.at |   32 ++++---
 mh/tests/testsuite.at                       |    2 +
 12 files changed, 250 insertions(+), 85 deletions(-)
 create mode 100644 mh/tests/anno.at
 copy maidag/tests/url-mbox.at => mh/tests/mhl.at (60%)

diff --git a/doc/texinfo/mu-mh.texi b/doc/texinfo/mu-mh.texi
index f25f625..dc8567a 100644
--- a/doc/texinfo/mu-mh.texi
+++ b/doc/texinfo/mu-mh.texi
@@ -211,6 +211,16 @@ For more information, please see @xref{reply_regex 
function}.
 @subsubsection Differences in MH Program Behavior
 
 @table @command
address@hidden anno
+
+The prompt in interactive mode is @samp{Component name:}, instead
+of @samp{Enter component name:} displayed by the RAND @command{anno}.
+
+If a @option{-component field} is not specified and standard input
+is not connected to a terminal, @command{anno} does not display
+the prompt before reading the component from the standard input.
+RAND @command{anno} displays the prompt anyway.
+
 @item burst
 
 The utility is able to burst both RFC 934 digest messages and MIME
@@ -241,13 +251,29 @@ This command is not provided. Use @option{fmtcheck} 
instead.
 
 @item mhl
 
-If the argument to @code{ignores} contains more than one component name
-it must be enclosed in double-quotes. Dangling equal sign is an error,
-to set a string variable to the empty value assign it an empty string, e.g.:
address@hidden""} (see the supplied @file{mhl.format} file).
+The @samp{ignores} keyword can be used in variable list.  In that
+case, if its value contains  more than one component name
+it must be enclosed in double-quotes, e.g.:
+
address@hidden
+leftadjust,compwidth=9,"ignores=msgid,message-id,received"
address@hidden smallexample
+
address@hidden
+The above is equivalent to the following traditional notation:
+
address@hidden
+leftadjust,compwidth=9
+ignores=msgid,message-id,received
address@hidden smallexample
+
+The @samp{MessageName} component is not yet implemented.
 
 Interactive prompting is not yet implemented.
 
+The following format variables are silently ignored: @samp{center},
address@hidden, @samp{datefield}.
+
 @item mhn
 
 @itemize @bullet
diff --git a/libmailutils/string/wordsplit.c b/libmailutils/string/wordsplit.c
index a7ed939..b5397ee 100644
--- a/libmailutils/string/wordsplit.c
+++ b/libmailutils/string/wordsplit.c
@@ -1028,7 +1028,7 @@ scan_qstring (struct mu_wordsplit *wsp, size_t start, 
size_t * end)
       j++;
   if (j < len && command[j] == q)
     {
-      int flags = _WSNF_QUOTE;
+      int flags = _WSNF_QUOTE|_WSNF_EMPTYOK;
       if (q == '\'')
        flags |= _WSNF_NOEXPAND;
       if (mu_wordsplit_add_segm (wsp, start + 1, j, flags))
@@ -1355,6 +1355,9 @@ mu_wordsplit_len (const char *command, size_t len, struct 
mu_wordsplit *wsp,
     {
       while ((rc = scan_word (wsp, start)) == _MU_WRDS_OK)
        start = skip_delim (wsp);
+      /* Make sure tail element is not joinable */
+      if (wsp->ws_tail)
+       wsp->ws_tail->flags &= ~_WSNF_JOIN;
     }
 
   if (wsp->ws_flags & MU_WRDSF_SHOWDBG)
diff --git a/libmailutils/tests/wordsplit.at b/libmailutils/tests/wordsplit.at
index 2159b7f..8bcd1bb 100644
--- a/libmailutils/tests/wordsplit.at
+++ b/libmailutils/tests/wordsplit.at
@@ -212,7 +212,6 @@ TESTWSP([K/V environment],[],[env_kv],
 [],
 [FOO=bar BAZ=qux])
 
-
 TESTWSP([nosplit with expansion],[],[nosplit],
 [a $FOO test],
 [NF: 1
@@ -311,4 +310,19 @@ TESTWSP([C escapes off],[],[-cescapes],
 3: newnline
 ])
 
+TESTWSP([empty quotes],[],[delim : ws return_delims],
+[t=""],
+[NF: 1
+0: t=
+])
+
+TESTWSP([delimiter following empty quotes],[],[delim : ws return_delims],
+[t="":r],
+[NF: 3
+0: t=
+1: :
+2: r
+])
+
+
 m4_popdef([TESTWSP])
diff --git a/mh/anno.c b/mh/anno.c
index aa16f32..972268c 100644
--- a/mh/anno.c
+++ b/mh/anno.c
@@ -109,7 +109,7 @@ main (int argc, char **argv)
   mu_mailbox_t mbox;
   mh_msgset_t msgset;
   size_t len;
-  
+
   MU_APP_INIT_NLS ();
 
   mh_argp_init ();
@@ -120,11 +120,37 @@ main (int argc, char **argv)
 
   if (!component)
     {
-      size_t n;
+      mu_stream_t in;
+      size_t size = 0;
+      char *p;
       
-      printf (_("Component name: "));
-      if (getline (&component, &n, stdin) <= 0 || *component == 0)
-       exit (1);
+      rc = mu_stdio_stream_create (&in, MU_STDIN_FD, 0);
+      if (rc)
+       {
+         mu_error (_("cannot create input stream: %s"), mu_strerror (rc));
+         exit (1);
+       }
+
+      if (isatty (0))
+       {
+         printf (_("Component name: "));
+         fflush (stdout);
+       }
+      rc = mu_stream_getline (in, &component, &size, NULL);
+      mu_stream_destroy (&in);
+      if (rc)
+       {
+         mu_error (_("error reading input stream: %s"), mu_strerror (rc));
+         exit (1);
+       }
+      p = mu_str_stripws (component);
+      if (*p == 0)
+       {
+         mu_error (_("invalid component name"));
+         exit (1);
+       }
+      if (p > component)
+       memmove (component, p, strlen (p) + 1);
     }
 
   if (!anno_text && !anno_date)
diff --git a/mh/mh_init.c b/mh/mh_init.c
index 8fc0bda..016bf54 100644
--- a/mh/mh_init.c
+++ b/mh/mh_init.c
@@ -40,9 +40,19 @@ char mh_list_format[] =
   "%<(zero)%17(decode(friendly{from}))%>"
   "  %(decode{subject})%<{body}<<%{body}>>%>";
 
+/* Make sure stdin is open.  If not, connect it to /dev/null. */
+static void
+mh_ensure_stdin ()
+{
+  int fd = open ("/dev/null", O_RDONLY);
+  if (fd != 0)
+    close (fd);
+}
+
 void
 mh_init ()
 {
+  mh_ensure_stdin ();
   /* Register all mailbox and mailer formats */
   mu_register_all_formats ();
 #ifdef WITH_TLS
diff --git a/mh/mh_list.c b/mh/mh_list.c
index 86b3c96..4761ace 100644
--- a/mh/mh_list.c
+++ b/mh/mh_list.c
@@ -152,11 +152,22 @@ parse_variable (locus_t *loc, mu_list_t formlist, char 
*str)
   size_t i;
   struct mu_wordsplit ws;
   mh_format_t fmt;
-
-  ws.ws_delim = ",=";
-  if (mu_wordsplit (str, &ws,
-                   MU_WRDSF_DEFFLAGS|MU_WRDSF_DELIM|
-                   MU_WRDSF_WS|MU_WRDSF_RETURN_DELIMS))
+  int wsflags;
+  
+  if (strncmp (str, "ignores=", 8) == 0 && str[8] != '"')
+    {
+      /* A hack to allow for traditional use of "ignores=", i.e.
+        as a single statement on a line, without double-quotes around
+        the argument */
+      wsflags = MU_WRDSF_NOCMD | MU_WRDSF_NOVAR | MU_WRDSF_NOSPLIT;
+    }
+  else
+    {
+      ws.ws_delim = ",";
+      wsflags = MU_WRDSF_DEFFLAGS|MU_WRDSF_DELIM|
+               MU_WRDSF_WS|MU_WRDSF_RETURN_DELIMS;
+    }
+  if (mu_wordsplit (str, &ws, wsflags))
     {
       mu_error ("%s:%d: mu_wordsplit(%s): %s",
                loc->filename,
@@ -172,7 +183,10 @@ parse_variable (locus_t *loc, mu_list_t formlist, char 
*str)
       char *name = ws.ws_wordv[i];
       char *value = NULL;
       mhl_variable_t *var;
-
+      
+      value = strchr (name, '=');
+      if (value)
+       *value++ = 0;
       stmt = stmt_alloc (stmt_variable);
       var = variable_lookup (name);
       if (!var)
@@ -184,12 +198,6 @@ parse_variable (locus_t *loc, mu_list_t formlist, char 
*str)
          exit (1);
        }
 
-      if (i + 1 < ws.ws_wordc && ws.ws_wordv[i+1][0] == '=')
-       {
-         i++;
-         value = ws.ws_wordv[++i];
-       }
-
       if ((var->type == dt_flag && value)
          || (var->type != dt_flag && !value))
        {
@@ -256,45 +264,39 @@ parse_line (locus_t *loc, mu_list_t formlist, char *str)
 mu_list_t 
 mhl_format_compile (char *name)
 {
-  FILE *fp;
+  mu_stream_t stream;
   mu_list_t formlist;
   char *buf = NULL;
-  size_t n = 0;
+  size_t size = 0, n;
   locus_t loc;
   int rc;
-  
-  fp = fopen (name, "r");
-  if (!fp)
+
+  rc = mu_file_stream_create (&stream, name, MU_STREAM_READ);
+  if (rc)
     {
-      mu_error (_("cannot open file %s: %s"), name, mu_strerror (errno));
+      mu_error (_("cannot open format file %s: %s"), name, mu_strerror (rc));
       return NULL;
     }
 
   if ((rc = mu_list_create (&formlist)) != 0)
     {
-      fclose (fp);
       mu_diag_funcall (MU_DIAG_ERROR, "mu_list_create", NULL, rc);
+      mu_stream_destroy (&stream);
       return NULL;
     }
 
   loc.filename = name;
   loc.line = 1;
-  while (getline (&buf, &n, fp) > 0)
+  while (mu_stream_getline (stream, &buf, &size, &n) == 0 && n > 0)
     {
-      char *p = buf;
-
-      while (*p && mu_isspace (*p))
-       ;
-
-      if (*p == 0 || *p == ';')
-       continue;
-
-      parse_line (&loc, formlist, p);
+      char *p = mu_str_stripws (buf);
+      if (!(*p == 0 || *p == ';'))
+       parse_line (&loc, formlist, p);
       loc.line++;
     }
 
   free (buf);
-  fclose (fp);
+  mu_stream_destroy (&stream);
   
   return formlist;
 }
@@ -470,13 +472,13 @@ _comp_name (void *item, void *date)
 }
 
 int
-header_is_printed (struct eval_env *env, char *name)
+header_is_printed (struct eval_env *env, const char *name)
 {
-  return mu_list_do (env->printed_fields, _comp_name, name) == 1;
+  return mu_list_do (env->printed_fields, _comp_name, (void*) name) == 1;
 }
 
 int
-want_header (struct eval_env *env, char *name)
+want_header (struct eval_env *env, const char *name)
 {
   char *p, *str = env->svar[S_IGNORES];
 
@@ -546,9 +548,8 @@ ovf_print (struct eval_env *env, char *str, int size, int 
nloff)
              mu_stream_write (env->output, env->prefix,
                               strlen (env->prefix), NULL);
              env->pos += strlen (env->prefix);
-             
-             goto_offset (env, nloff);
            }
+         goto_offset (env, nloff);
        }
       
       if (env->pos + len > env->ivar[I_WIDTH])
@@ -656,19 +657,33 @@ print_header_value (struct eval_env *env, char *val)
   return 0;
 }
 
+void
+print_component_name (struct eval_env *env)
+{
+  if (!env->bvar[B_NOCOMPONENT])
+    {
+      print (env, env->svar[S_COMPONENT], 0);
+      if (mu_c_strcasecmp (env->svar[S_COMPONENT], "body"))
+       print (env, ": ", 0);
+    }
+}
+
 int
 eval_component (struct eval_env *env, char *name)
 {
   mu_header_t hdr;
   char *val;
-  
+
   mu_message_get_header (env->msg, &hdr);
   if (mu_header_aget_value (hdr, name, &val))
     return 0;
 
+  print_component_name (env);
   mu_list_append (env->printed_fields, name);
   print_header_value (env, val);
   free (val);
+  if (env->bvar[B_NEWLINE])
+    newline (env);
   return 0;
 }
 
@@ -680,9 +695,12 @@ eval_body (struct eval_env *env)
   char buf[128]; /* FIXME: Fixed size. Bad */
   size_t n;
   mu_body_t body = NULL;
-
+  int nl;
+  
   if (env->bvar[B_DISABLE_BODY])
     return 0;
+
+  print_component_name (env);
   
   env->prefix = env->svar[S_COMPONENT];
 
@@ -712,8 +730,11 @@ eval_body (struct eval_env *env)
     {
       buf[n] = 0;
       print (env, buf, 0);
+      nl = buf[n-1] == '\n';
     }
   mu_stream_destroy (&input);
+  if (!nl && env->bvar[B_NEWLINE])
+    newline (env);
   return 0;
 }
 
@@ -722,25 +743,30 @@ eval_extras (struct eval_env *env)
 {
   mu_header_t hdr;
   size_t i, num;
-  char buf[512];
+  char *str;
 
+  print_component_name (env);
   mu_message_get_header (env->msg, &hdr);
   mu_header_get_field_count (hdr, &num);
   for (i = 1; i <= num; i++)
     {
-      mu_header_get_field_name (hdr, i, buf, sizeof buf, NULL);
-      if (want_header (env, buf)
-         && !header_is_printed (env, buf))
+      mu_header_aget_field_name (hdr, i, &str);
+      if (want_header (env, str)
+         && !header_is_printed (env, str))
        {
          goto_offset (env, env->ivar[I_OFFSET]);
-         print (env, buf, 0);
-         print (env, ":", 0);
-         mu_header_get_field_value (hdr, i, buf, sizeof buf, NULL);
-         print_header_value (env, buf);
-         if (env->bvar[B_NEWLINE])
+         print (env, str, 0);
+         print (env, ": ", 0);
+         free (str);
+         mu_header_aget_field_value (hdr, i, &str);
+         print_header_value (env, str);
+         if (i < num && env->bvar[B_NEWLINE])
            newline (env);
        }
+      free (str);
     }
+  if (env->bvar[B_NEWLINE])
+    newline (env);
   return 0;
 }
 
@@ -756,13 +782,6 @@ eval_comp (struct eval_env *env, char *compname, mu_list_t 
format)
   if (!lenv.svar[S_COMPONENT])
     lenv.svar[S_COMPONENT] = compname;
   
-  if (!lenv.bvar[B_NOCOMPONENT])
-    {
-      print (&lenv, lenv.svar[S_COMPONENT], 0);
-      if (strcmp (compname, "body"))
-       print (&lenv, ":", 0);
-    }
-
   if (strcmp (compname, "extras") == 0)
     eval_extras (&lenv);
   else if (strcmp (compname, "body") == 0)
@@ -770,9 +789,6 @@ eval_comp (struct eval_env *env, char *compname, mu_list_t 
format)
   else
     eval_component (&lenv, compname);
   
-  if (lenv.bvar[B_NEWLINE])
-    newline (&lenv);
-
   env->pos = lenv.pos;
   env->nlines = lenv.nlines;
   
diff --git a/mh/mhl.c b/mh/mhl.c
index 5f6b6fc..9b5abcb 100644
--- a/mh/mhl.c
+++ b/mh/mhl.c
@@ -142,7 +142,7 @@ open_output ()
 
   if (interactive && !nomoreproc)
     {
-      if (!moreproc)
+      if (!moreproc || !moreproc[0])
        moreproc = mh_global_profile_get ("moreproc", getenv ("PAGER"));
     }
   else
diff --git a/mh/mhl.format b/mh/mhl.format
index 210d98d..4b6b7cb 100644
--- a/mh/mhl.format
+++ b/mh/mhl.format
@@ -2,12 +2,12 @@
 ;
 ; GNU Mailutils -- a suite of utilities for electronic mail
 ; Copyright (C) 2003, 2010 Free Software Foundation, Inc.
-; Distributed under GPL.
+; Distributed under GPLv3+.  See <http://gnu.org/licenses/gpl.html>.
 ;
 : -- using template mhl.format --
 overflowtext="***",overflowoffset=5
 leftadjust,compwidth=9
-ignores="msgid,message-id,received"
+ignores=msgid,message-id,received
 Date:formatfield="%<(nodate{text})%{text}%|%(pretty{text})%>"
 To:
 cc:
@@ -17,5 +17,5 @@ Subject:
 :
 extras:nocomponent
 :
-body:nocomponent,overflowtext="",overflowoffset=0,noleftadjust
+body:nocomponent,overflowtext=,overflowoffset=0,noleftadjust
 ; End of mhl.format
\ No newline at end of file
diff --git a/mh/tests/Makefile.am b/mh/tests/Makefile.am
index 26be1c7..2006a35 100644
--- a/mh/tests/Makefile.am
+++ b/mh/tests/Makefile.am
@@ -39,9 +39,11 @@ $(srcdir)/package.m4: $(top_srcdir)/configure.ac
 ## ------------ ##
 
 TESTSUITE_AT = \
+ anno.at\
  folder.at\
  inc.at\
  mark.at\
+ mhl.at\
  mhparam.at\
  mhpath.at\
  scan.at\
diff --git a/mh/tests/anno.at b/mh/tests/anno.at
new file mode 100644
index 0000000..376d176
--- /dev/null
+++ b/mh/tests/anno.at
@@ -0,0 +1,62 @@
+# This file is part of GNU Mailutils. -*- Autotest -*-
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# GNU Mailutils 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 3, or (at
+# your option) any later version.
+#
+# GNU Mailutils 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 GNU Mailutils.  If not, see <http://www.gnu.org/licenses/>.
+
+m4_pushdef[MH_KEYWORDS],[anno])
+
+MH_CHECK([anno],[anno00],[
+MUT_MBCOPY($abs_top_srcdir/testsuite/mh/mbox1,[Mail/inbox])
+echo "Current-Folder: inbox" > Mail/context
+echo "cur: 1" > Mail/inbox/.mh_sequences
+echo Replied | anno || exit $?
+sed -n '1{s/Replied: .*/REPLIED/p}' Mail/inbox/1
+],
+[0],
+[REPLIED
+])
+
+MH_CHECK([anno -component],[anno01 anno-component],[
+MUT_MBCOPY($abs_top_srcdir/testsuite/mh/mbox1,[Mail/inbox])
+echo "Current-Folder: inbox" > Mail/context
+anno -component Replied 1 || exit $?
+sed -n '1{s/Replied: .*/REPLIED/p}' Mail/inbox/1
+],
+[0],
+[REPLIED
+])
+
+MH_CHECK([anno -component -text],[anno02 anno-component-text],[
+MUT_MBCOPY($abs_top_srcdir/testsuite/mh/mbox1,[Mail/inbox])
+echo "Current-Folder: inbox" > Mail/context
+anno -component Replied -text OK 1 || exit $?
+sed -n '3,$d;/Replied/{s/Replied: [[A-Z][a-z][a-z], [0-9][0-9] [A-Z][a-z][a-z] 
[0-9][0-9][0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9] .*]/Replied: DATE/;p}' 
Mail/inbox/1
+],
+[0],
+[Replied: OK
+Replied: DATE
+])
+
+MH_CHECK([anno -component -text -nodate],[anno03 anno-component-text-nodate],[
+MUT_MBCOPY($abs_top_srcdir/testsuite/mh/mbox1,[Mail/inbox])
+echo "Current-Folder: inbox" > Mail/context
+anno -component Replied -text OK -nodate 1 || exit $?
+sed -n '3,$d;/Replied/{s/Replied: [[A-Z][a-z][a-z], [0-9][0-9] [A-Z][a-z][a-z] 
[0-9][0-9][0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9] .*]/Replied: DATE/;p}' 
Mail/inbox/1
+],
+[0],
+[Replied: OK
+])
+
+m4_popdef[MH_KEYWORDS])
+# End of anno.at
diff --git a/maidag/tests/url-mbox.at b/mh/tests/mhl.at
similarity index 60%
copy from maidag/tests/url-mbox.at
copy to mh/tests/mhl.at
index dd29ab4..e8f17e6 100644
--- a/maidag/tests/url-mbox.at
+++ b/mh/tests/mhl.at
@@ -14,21 +14,25 @@
 # You should have received a copy of the GNU General Public License
 # along with GNU Mailutils.  If not, see <http://www.gnu.org/licenses/>.
 
-AT_SETUP([URL mode])
-AT_KEYWORDS([maidag url-mbox url])
+m4_pushdef[MH_KEYWORDS],[mhl])
 
-AT_CHECK([
-echo ENVELOPE > expout
-cat $abs_top_srcdir/maidag/tests/input.msg >> expout
-echo "" >> expout
-mkdir spool
-
-maidag MAIDAG_OPTIONS --from 'address@hidden' --url mbox:spool/out < dnl
- $abs_top_srcdir/maidag/tests/input.msg || exit $?
-sed '1s/From address@hidden/ENVELOPE/' spool/out
+MH_CHECK([mhl],[mhl00],[
+MUT_MBCOPY($abs_top_srcdir/testsuite/mh/teaparty,[Mail/inbox])
+mhl -form $abs_top_srcdir/mh/mhl.format Mail/inbox/2
 ],
 [0],
-[expout])
+[ -- using template mhl.format --
+Date:    Mon, 29 Jul 2002 22:00:02 +0100
+To:      March Hare  <address@hidden>
+
+From:    Alice  <address@hidden>
+Subject: Re: Invitation
+
+X-Envelope-Date: Mon Jul 29 22:00:09 2002
+X-Envelope-Sender: address@hidden
+
+I don't see any wine
+]) 
 
-AT_CLEANUP
- 
\ No newline at end of file
+m4_popdef[MH_KEYWORDS])
+# End of mhl.at
diff --git a/mh/tests/testsuite.at b/mh/tests/testsuite.at
index b992930..86bc7ba 100644
--- a/mh/tests/testsuite.at
+++ b/mh/tests/testsuite.at
@@ -50,3 +50,5 @@ m4_include([mark.at])
 m4_include([mhparam.at])
 m4_include([refile.at])
 m4_include([mhpath.at])
+m4_include([mhl.at])
+m4_include([anno.at])


hooks/post-receive
-- 
GNU Mailutils



reply via email to

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