/*++ /* NAME /* dict_test_helper 3 /* SUMMARY /* dictionary test helpers /* SYNOPSIS /* #include <dict_test_helper.h> /* /* DICT *dict_open_and_capture_msg( /* const char *type_name, /* int open_flags, /* int dict_flags, /* VSTRING *out_msg_buf) /* /* char *dict_compose_spec( /* const char *dict_type, /* const char **component_specs, /* int open_flags, /* int dict_flags, /* VSTRING *out_composite_spec, /* ARGV *out_reg_component_specs) /* /* chat char *dict_get_and_capture_msg( /* DICT *dict, /* const char *key, /* VSTRING *out_msg_buf) /* /* struct dict_get_verify_data { /* .in +4 /* const char *key; /* const char *want_value; /* int want_error; /* const char *want_msg; /* .in -4 /* } /* /* int dict_get_and_verify( /* DICT *dict, /* const char *key, /* const char *want_value, /* int want_error, /* const char *want_msg) /* /* int dict_get_and_verify_bulk( /* DICT *dict, /* const struct dict_get_verify_data *data) /* DESCRIPTION /* This module contains common code for dictionary tests. /* /* All functions that capture msg(3) output clear the output /* VSTRING buffer first. /* /* dict_open_and_capture_msg() invokes dict_open() while /* capturing msg(3) output to a VSTRING buffer. /* /* dict_compose_spec() constructs a composite dictionary spec with /* the form "\fIdict_type:{component_specs[0],...}\fR". It records in /* out_reg_component_specs the names under which the component_specs /* dictionaries will be registered with dict_register(), with each /* name having the form "\fItype:name(open_flags,dict_flags). The /* result value is the out_composite_spec string value. /* /* dict_get_and_capture_msg() invokes dict_get() while capturing /* msg(3) output to a VSTRING buffer. /* /* dict_get_and_verify() invokes dict_get() and verifies that /* expectations are met. The want_value argument requires an exact /* match; specify null if the expected lookup result is "not found". /* The want_error argument requires an exact match; specify zero /* (DICT_ERR_NONE) or one of the other expected DICT_ERR_* /* values. The want_msg argument requires a substring match; /* specify null if no msg(3) output is expected. The result value /* is PASS or FAIL. /* /* dict_get_and_verify_bulk() provides a convenient interface for /* multiple lookup tests. /* LICENSE /* The Secure Mailer license must be distributed with this software. /* AUTHOR(S) /* Wietse Venema /* porcupine.org
/*--*/
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.