summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2012-10-22 17:09:43 -0400
committerRoger Dingledine <arma@torproject.org>2012-10-22 17:09:43 -0400
commit4c8b58f9005b7a187878273b8ff0f8ec23e86326 (patch)
tree07dac5f06df0d3a1b0aa69fc3e28a4e2f3cd1adf /src/test
parent1cc06bd35e4203569ecc72ff314a1dd543f60651 (diff)
downloadtor-4c8b58f9005b7a187878273b8ff0f8ec23e86326.tar.gz
tor-4c8b58f9005b7a187878273b8ff0f8ec23e86326.zip
add a unit test to expose bug 7192
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/test.c b/src/test/test.c
index 6bf2d28d90..9b510d2921 100644
--- a/src/test/test.c
+++ b/src/test/test.c
@@ -1014,6 +1014,7 @@ test_policy_summary_helper(const char *policy_str,
config_line_t line;
smartlist_t *policy = smartlist_new();
char *summary = NULL;
+ const char *summary_after;
int r;
short_policy_t *short_policy = NULL;
@@ -1030,8 +1031,11 @@ test_policy_summary_helper(const char *policy_str,
short_policy = parse_short_policy(summary);
tt_assert(short_policy);
+ summary_after = write_short_policy(short_policy);
+ test_streq(summary, summary_after);
done:
+ tor_free(summary_after);
tor_free(summary);
if (policy)
addr_policy_list_free(policy);