diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-03-31 16:44:24 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-03-31 14:24:22 +0200 |
commit | 620921b36bbf9ccfa91124d27b7437ffdb04f660 (patch) | |
tree | fe2111b2cd87e0a1e8d4c25d144cf4eb393ca5d4 /lib/util/charset/charset.h | |
parent | 26ccb6d5ed88638dd3643632157771320cd8042a (diff) | |
download | samba-620921b36bbf9ccfa91124d27b7437ffdb04f660.tar.gz samba-620921b36bbf9ccfa91124d27b7437ffdb04f660.tar.bz2 samba-620921b36bbf9ccfa91124d27b7437ffdb04f660.zip |
lib/util/charset Add tests for strcasecmp_m(), talloc_strupper() et al
This adds tests for:
strncasecmp_m
strcasecmp_m
strupper_talloc_n
strlower_talloc
strhaslower
strhasupper
The tests can certainly be improved with pre-calculated upper and
lower case text, but this at least puts them though their paces.
Andrew Bartlett
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Mar 31 14:24:22 CEST 2011 on sn-devel-104
Diffstat (limited to 'lib/util/charset/charset.h')
-rw-r--r-- | lib/util/charset/charset.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/util/charset/charset.h b/lib/util/charset/charset.h index 82396e1498..16bb9c62fb 100644 --- a/lib/util/charset/charset.h +++ b/lib/util/charset/charset.h @@ -130,17 +130,29 @@ void string_replace_m(char *s, char oldc, char newc); bool strcsequal(const char *s1,const char *s2); bool strequal_m(const char *s1, const char *s2); int strncasecmp_m(const char *s1, const char *s2, size_t n); +int strncasecmp_m_handle(struct smb_iconv_handle *iconv_handle, + const char *s1, const char *s2, size_t n); bool next_token(const char **ptr,char *buff, const char *sep, size_t bufsize); +int strcasecmp_m_handle(struct smb_iconv_handle *iconv_handle, + const char *s1, const char *s2); int strcasecmp_m(const char *s1, const char *s2); size_t count_chars_m(const char *s, char c); void strupper_m(char *s); void strlower_m(char *s); char *strupper_talloc(TALLOC_CTX *ctx, const char *src); char *talloc_strdup_upper(TALLOC_CTX *ctx, const char *src); +char *strupper_talloc_n_handle(struct smb_iconv_handle *iconv_handle, + TALLOC_CTX *ctx, const char *src, size_t n); char *strupper_talloc_n(TALLOC_CTX *ctx, const char *src, size_t n); + char *strlower_talloc_handle(struct smb_iconv_handle *iconv_handle, + TALLOC_CTX *ctx, const char *src); char *strlower_talloc(TALLOC_CTX *ctx, const char *src); bool strhasupper(const char *string); +bool strhaslower_handle(struct smb_iconv_handle *ic, + const char *string); bool strhaslower(const char *string); +bool strhasupper_handle(struct smb_iconv_handle *ic, + const char *string); char *strrchr_m(const char *s, char c); char *strchr_m(const char *s, char c); |