aboutsummaryrefslogtreecommitdiffstats
path: root/trio/regression.c
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2010-02-26 03:09:21 +0100
committerMatthias Andree <matthias.andree@gmx.de>2010-02-26 03:11:47 +0100
commit90ec0bf58bf8cd9e59fd4cab2c1dbfde9b4119e1 (patch)
tree98d5905baa26c2976b57060de5de6665ad2076ba /trio/regression.c
parent64d253be1e67688147246819eeb8e4f8f8e77243 (diff)
downloadfetchmail-90ec0bf58bf8cd9e59fd4cab2c1dbfde9b4119e1.tar.gz
fetchmail-90ec0bf58bf8cd9e59fd4cab2c1dbfde9b4119e1.tar.bz2
fetchmail-90ec0bf58bf8cd9e59fd4cab2c1dbfde9b4119e1.zip
Import new trio version, disabling config.h #include.
Diffstat (limited to 'trio/regression.c')
-rw-r--r--trio/regression.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/trio/regression.c b/trio/regression.c
index 0716cc63..57c0347e 100644
--- a/trio/regression.c
+++ b/trio/regression.c
@@ -43,7 +43,7 @@
#define DOUBLE_EQUAL(x,y) (((x)>(y)-DBL_EPSILON) && ((x)<(y)+DBL_EPSILON))
#define FLOAT_EQUAL(x,y) (((x)>(y)-FLT_EPSILON) && ((x)<(y)+FLT_EPSILON))
-static TRIO_CONST char rcsid[] = "@(#)$Id: regression.c,v 1.65 2009/06/07 15:14:31 breese Exp $";
+static TRIO_CONST char rcsid[] = "@(#)$Id: regression.c,v 1.67 2010/01/26 13:02:02 breese Exp $";
#if defined(TRIO_EMBED_NAN)
# include "trionan.c"
@@ -1208,6 +1208,7 @@ TRIO_ARGS5((file, line, expected, format, original),
char data[512];
trio_snprintf(data, sizeof(data), "%s", original);
+ string[0] = 0;
trio_sscanf(data, format, string);
return Verify(file, line, expected, "%s", string);
}
@@ -1534,6 +1535,7 @@ VerifyDynamicStrings(TRIO_NOARGS)
int nerrors = 0;
#if !defined(TRIO_MINIMAL)
trio_string_t *string;
+ const char no_terminate[5] = { 'h', 'e', 'l', 'l', 'o' };
string = trio_xstring_duplicate("Find me now");
if (string == NULL) {
@@ -1553,6 +1555,9 @@ VerifyDynamicStrings(TRIO_NOARGS)
nerrors++;
if (trio_xstring_match_case(string, "* ME *"))
nerrors++;
+ if (!trio_xstring_append_max(string, no_terminate, 5) ||
+ !trio_xstring_equal(string, "FIND ME NOW AND AGAINhello"))
+ nerrors++;
error:
if (string)