Skip to content

Commit aac7566

Browse files
committed
2.4.18.1: test: test_util.c: cater for older Apache versions
Signed-off-by: Hans Zandbelt <[email protected]>
1 parent 4c6479b commit aac7566

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

test/test_util.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,17 +278,29 @@ START_TEST(test_util_expr_exec) {
278278
// NB: stub only
279279
result = oidc_util_apr_expr_exec(r, expr, TRUE);
280280
ck_assert_ptr_nonnull(result);
281+
#if HAVE_APACHE_24
281282
ck_assert_str_eq(result, "stub.c");
282-
283+
#else
284+
ck_assert_str_eq(result, "true");
285+
#endif
283286
// NB: stub only
284287
result = oidc_util_apr_expr_exec(r, expr, FALSE);
288+
#if HAVE_APACHE_24
285289
ck_assert_ptr_null(result);
290+
#else
291+
ck_assert_str_eq(result, "true");
292+
#endif
286293

287294
// NB: stub only
288295
expr = NULL;
289296
rv = oidc_util_apr_expr_parse(cmd, "#", &expr, FALSE);
297+
#if HAVE_APACHE_24
290298
ck_assert_ptr_nonnull(rv);
291299
ck_assert_ptr_null(expr);
300+
#else
301+
ck_assert_ptr_null(rv);
302+
ck_assert_ptr_nonnull(expr);
303+
#endif
292304
}
293305
END_TEST
294306

0 commit comments

Comments
 (0)