Author: joes
Date: Wed Feb 16 16:59:55 2005
New Revision: 154106
URL: http://svn.apache.org/viewcvs?view=rev&rev=154106
Log:
- AT_skip added.
- apr_strings.h needs including in at.h; now we shouldn't need
the WIN32 _snprintf conditional in there.
- Skip some cookie.c tests that Visual Studio doesn't like.
Modified:
httpd/apreq/branches/multi-env-unstable/library/t/at.h
httpd/apreq/branches/multi-env-unstable/library/t/cookie.c
Modified: httpd/apreq/branches/multi-env-unstable/library/t/at.h
URL:
http://svn.apache.org/viewcvs/httpd/apreq/branches/multi-env-unstable/library/t/at.h?view=diff&r1=154105&r2=154106
==============================================================================
--- httpd/apreq/branches/multi-env-unstable/library/t/at.h (original)
+++ httpd/apreq/branches/multi-env-unstable/library/t/at.h Wed Feb 16 16:59:55
2005
@@ -25,10 +25,7 @@
#include <stdarg.h>
#include <stdlib.h>
#include <setjmp.h>
-
-#ifdef WIN32
-#define snprintf _snprintf
-#endif
+#include "apr_strings.h"
typedef struct at_t at_t;
typedef struct at_report_t at_report_t;
@@ -141,7 +138,6 @@
}
-
/* These are "checks". */
static APR_INLINE
@@ -249,6 +245,19 @@
#define AT_NE(a, b, fmt) at_check(AT, ((a) != (b)), #a " != " #b,\
__FILE__, __LINE__, fmt, a, b)
+
+static APR_INLINE
+void at_skip(at_t *t, int n, const char *reason, const char *file, int line) {
+ char buf[256];
+ while (n-- > 0) {
+ ++t->current;
+ apr_snprintf(buf, 256, "not ok %d - %s (%d) #skipped: %s (%s:%d)",
+ t->current + t->prior, t->name, t->current, reason, file,
line);
+ at_report(t, buf);
+ }
+}
+
+#define AT_skip(n, reason) at_skip(AT, n, reason, __FILE__, __LINE__)
/* Report utilities. */
Modified: httpd/apreq/branches/multi-env-unstable/library/t/cookie.c
URL:
http://svn.apache.org/viewcvs/httpd/apreq/branches/multi-env-unstable/library/t/cookie.c?view=diff&r1=154105&r2=154106
==============================================================================
--- httpd/apreq/branches/multi-env-unstable/library/t/cookie.c (original)
+++ httpd/apreq/branches/multi-env-unstable/library/t/cookie.c Wed Feb 16
16:59:55 2005
@@ -110,9 +110,10 @@
AT_str_eq(apreq_cookie_as_string(c,p),"rfc=out; Version=1");
c->domain = apr_pstrdup(p, "example.com");
+
+#ifndef WIN32
AT_str_eq(apreq_cookie_as_string(c,p),
"rfc=out; Version=1; domain=\"example.com\"");
-
c->path = apr_pstrdup(p, "/quux");
AT_str_eq(apreq_cookie_as_string(c,p),
"rfc=out; Version=1; path=\"/quux\"; domain=\"example.com\"");
@@ -123,6 +124,13 @@
"domain=\"example.com\"; max-age=%ld",
expires);
AT_str_eq(apreq_cookie_as_string(c,p), val);
+
+#else
+ (void)val;
+ (void)expires;
+ AT_skip(3, "VC++ preprocessor error C2107: illegal escape sequence");
+#endif
+
}
static void ua_version(dAT)