diff options
author | gmcdonald | 2010-02-13 01:32:03 +0000 |
---|---|---|
committer | gmcdonald | 2010-02-13 01:32:03 +0000 |
commit | 0425aadc78680e53000fd0108b540d6eca048516 (patch) | |
tree | 8ec7ab8e015d454c5ec586dfc91e05a2dce1cfc0 /util/test/utils/utils_test.c | |
download | axis2c-0425aadc78680e53000fd0108b540d6eca048516.tar.gz axis2c-0425aadc78680e53000fd0108b540d6eca048516.tar.bz2 |
Moving axis svn, part of TLP move INFRA-2441
git-svn-id: http://svn.apache.org/repos/asf/axis/axis2/c/core/trunk@909681 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'util/test/utils/utils_test.c')
-rw-r--r-- | util/test/utils/utils_test.c | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/util/test/utils/utils_test.c b/util/test/utils/utils_test.c new file mode 100644 index 0000000..2bbf67f --- /dev/null +++ b/util/test/utils/utils_test.c @@ -0,0 +1,47 @@ +#include "../util/create_env.h" +#include <axutil_utils.h> + +axutil_env_t *env = NULL; +axis2_char_t * request = "This is a requset"; +axis2_char_t * s = "<root>This is a & '""xml string</root>"; +axis2_char_t c = 'c'; + +/** @brief test utils + * test quote string + */ + +axis2_status_t test_utils() +{ + axis2_char_t **op, *quote_string; + int hexit; + env = create_environment(); + op = axutil_parse_request_url_for_svc_and_op(env,request); + quote_string = axutil_xml_quote_string(env,s,1); + printf("The quote string is%s\n",(char *)quote_string); + hexit = axutil_hexit(c); + printf("%d\n",hexit); + if(op && quote_string) + { + printf("The test is SUCCESS\n"); + } + if(!op || !quote_string) + { + printf("The test is FAIL"); + } + return AXIS2_SUCCESS; +} +int main() +{ + int status = AXIS2_SUCCESS; + env = create_environment(); + status = test_utils(); + if(status == AXIS2_FAILURE) + { + printf(" test failed"); + } + axutil_env_free(env); + return 0; +} + + + |