You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by jo...@apache.org on 2004/05/24 08:01:07 UTC
cvs commit: apr/test testenv.c
jorton 2004/05/23 23:01:07
Modified: test testenv.c
Log:
* test/testenv.c: Return after ENOTIMPL checks trigger to prevent
spurious test failures since ABTS_NOT_IMPL doesn't longjmp away.
Revision Changes Path
1.5 +7 -1 apr/test/testenv.c
Index: testenv.c
===================================================================
RCS file: /home/cvs/apr/test/testenv.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -d -u -r1.4 -r1.5
--- testenv.c 14 May 2004 14:43:22 -0000 1.4
+++ testenv.c 24 May 2004 06:01:07 -0000 1.5
@@ -31,8 +31,9 @@
have_env_set = (rv != APR_ENOTIMPL);
if (!have_env_set) {
ABTS_NOT_IMPL(tc, "apr_env_set");
+ } else {
+ apr_assert_success(tc, "set environment variable", rv);
}
- apr_assert_success(tc, "set environment variable", rv);
}
static void test_getenv(abts_case *tc, void *data)
@@ -42,12 +43,14 @@
if (!have_env_set) {
ABTS_NOT_IMPL(tc, "apr_env_set (skip test for apr_env_get)");
+ return;
}
rv = apr_env_get(&value, TEST_ENVVAR_NAME, p);
have_env_get = (rv != APR_ENOTIMPL);
if (!have_env_get) {
ABTS_NOT_IMPL(tc, "apr_env_get");
+ return;
}
apr_assert_success(tc, "get environment variable", rv);
ABTS_STR_EQUAL(tc, TEST_ENVVAR_VALUE, value);
@@ -60,16 +63,19 @@
if (!have_env_set) {
ABTS_NOT_IMPL(tc, "apr_env_set (skip test for apr_env_delete)");
+ return;
}
rv = apr_env_delete(TEST_ENVVAR_NAME, p);
if (rv == APR_ENOTIMPL) {
ABTS_NOT_IMPL(tc, "apr_env_delete");
+ return;
}
apr_assert_success(tc, "delete environment variable", rv);
if (!have_env_get) {
ABTS_NOT_IMPL(tc, "apr_env_get (skip sanity check for apr_env_delete)");
+ return;
}
rv = apr_env_get(&value, TEST_ENVVAR_NAME, p);
ABTS_INT_EQUAL(tc, APR_ENOENT, rv);