From 76ab5d8de8ad137a2ee076639b6ebeb70b1f70f8 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Fri, 18 May 2012 16:04:50 -0400 Subject: TESTS: Print messages when LDAP options do not match --- src/tests/common.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/tests/common.c b/src/tests/common.c index 3e4753e08..65e695581 100644 --- a/src/tests/common.c +++ b/src/tests/common.c @@ -59,7 +59,11 @@ compare_dp_options(struct dp_option *map1, size_t size1, if (map2[i].opt_name == NULL) return ERANGE; /* Ensure that the option names are the same */ - if(strcmp(map1[i].opt_name, map2[i].opt_name) != 0) return EINVAL; + if(strcmp(map1[i].opt_name, map2[i].opt_name) != 0) { + fprintf(stderr, "Expected [%s], got [%s]\n", + map1[i].opt_name, map2[i].opt_name); + return EINVAL; + } } /* Leftover options in map2 */ @@ -85,7 +89,11 @@ compare_sdap_attr_maps(struct sdap_attr_map *map1, size_t size1, if (map2[i].opt_name == NULL) return ERANGE; /* Ensure that the option names are the same */ - if(strcmp(map1[i].opt_name, map2[i].opt_name) != 0) return EINVAL; + if(strcmp(map1[i].opt_name, map2[i].opt_name) != 0) { + fprintf(stderr, "Expected [%s], got [%s]\n", + map1[i].opt_name, map2[i].opt_name); + return EINVAL; + } } /* Leftover options in map2 */ -- cgit