* mu: more 'fixing'/'massaging' of queries
This commit is contained in:
@ -24,6 +24,8 @@
|
||||
|
||||
#include <glib.h>
|
||||
#include <glib/gstdio.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "../mu-query.h"
|
||||
|
||||
@ -298,12 +300,11 @@ test_mu_find_links (void)
|
||||
static void
|
||||
test_mu_find_maildir_special (void)
|
||||
{
|
||||
/* ensure that maldirs with spaces in their names work... */
|
||||
search ("\"maildir:/wom bat\" subject:atoms", 1);
|
||||
search ("\"maildir:/wom_bat\" subject:atoms", 1);
|
||||
search ("\"maildir:/wOm_bàT\"", 3);
|
||||
search ("\"maildir:/wOm*\"", 3);
|
||||
search ("\"maildir:/wOm *\"", 3);
|
||||
search ("\"maildir:wom bat\"", 0);
|
||||
search ("\"maildir:/wOm_*\"", 3);
|
||||
search ("\"maildir:wom_bat\"", 0);
|
||||
search ("\"maildir:/wombat\"", 0);
|
||||
search ("subject:atoms", 1);
|
||||
}
|
||||
@ -366,8 +367,10 @@ get_file_size (const char* path)
|
||||
struct stat statbuf;
|
||||
|
||||
rv = stat (path, &statbuf);
|
||||
if (rv != 0)
|
||||
if (rv != 0) {
|
||||
/* g_warning ("error: %s", strerror (errno)); */
|
||||
return -1;
|
||||
}
|
||||
|
||||
return (gint64)statbuf.st_size;
|
||||
}
|
||||
|
||||
@ -213,7 +213,7 @@ test_mu_query_03 (void)
|
||||
{ "s:LISP", 1},
|
||||
|
||||
{ "s:\"Re: Learning LISP; Scheme vs elisp.\"", 1},
|
||||
{ "subject:Re: Learning LISP; Scheme vs elisp.", 0},
|
||||
{ "subject:Re: Learning LISP; Scheme vs elisp.", 1},
|
||||
{ "subject:\"Re: Learning LISP; Scheme vs elisp.\"", 1},
|
||||
{ "to:help-gnu-emacs@gnu.org", 4},
|
||||
{ "t:help-gnu-emacs", 4},
|
||||
@ -530,7 +530,7 @@ test_mu_query_tags (void)
|
||||
{ "tag:lost tag:paradise", 1},
|
||||
{ "tag:lost tag:horizon", 0},
|
||||
{ "tag:lost OR tag:horizon", 1},
|
||||
{ "x:paradise,lost", 0},
|
||||
{ "x:paradise,lost", 1},
|
||||
};
|
||||
|
||||
for (i = 0; i != G_N_ELEMENTS(queries); ++i)
|
||||
|
||||
Reference in New Issue
Block a user