Go to the SVN repository for this file.
2 #include "freetds/odbc.h" 34 const char*connect_string_end = connect_string + strlen(connect_string);
37fprintf(stderr,
"Error setting language in test '%s'\n", name);
48fprintf(stderr,
"Error parsing string in test '%s'\n", name);
54check_func(
login, parsed_params);
62 #define CHECK(name, s) \ 63 static const char *name ## _connect_string = s; \ 64 static void name ## _check(TDSLOGIN *login, TDS_PARSED_PARAM *parsed_params); \ 65 static void name(void) { \ 66 test_common(#name, name ## _connect_string, name ## _check); \ 68 static void name ## _check(TDSLOGIN *login, TDS_PARSED_PARAM *parsed_params) 70 #define CHECK_ERROR(name, s) \ 71 static const char *name ## _connect_string = s; \ 72 static void name(void) { \ 73 test_common(#name, name ## _connect_string, NULL); \ 77 "DRIVER=libtdsodbc.so;SERVER=127.0.0.1;PORT=1337;UID=test_username;PWD=test_password;DATABASE=test_db;ClientCharset=UTF-8;")
87 "DRIVER={libtdsodbc.so};SERVER={127.0.0.1};PORT={1337};UID={test_username};PWD={test_password};DATABASE={test_db};ClientCharset={UTF-8};")
97 "DRIVER={libtdsodbc.so};SERVER={127.0.0.1};PORT={1337};UID={test_username};PWD={[]{}}(),;?*=!@};DATABASE={test_db};ClientCharset={UTF-8};")
107 "DRIVER={libtdsodbc.so};SERVER={127.0.0.1};PORT={1337};UID={test_username};PWD={test{}}_password};DATABASE={test_db};ClientCharset={UTF-8};")
117 "DRIVER={libtdsodbc.so};SERVER={127.0.0.1};PORT={1337};UID={test_username};PWD={test{}};_password};DATABASE={test_db};ClientCharset={UTF-8};")
127 "Driver=FreeTDS;Server=1.2.3.4;Port=1433;Database=test;uid=test_user;pwd={p@ssw0rd}")
138 "Driver=FreeTDS;Server=1.2.3.4;Port=1433;pwd={p@ssw0rd");
static void password_bug_report(void)
static void simple_string(void)
static void password_contains_curly_braces(void)
void check_func_t(TDSLOGIN *login, TDS_PARSED_PARAM *parsed_params)
static void assert_equal_str(TDS_PARSED_PARAM param, const char *b)
static void password_contains_curly_braces_and_separator(void)
static void assert_equal_dstr(DSTR a, const char *b)
static void simple_escaped_string(void)
static void unfinished(void)
#define CHECK_ERROR(name, s)
static void test_common(const char *name, const char *connect_string, check_func_t *check_func)
static void test_special_symbols(void)
void odbc_errs_reset(struct _sql_errors *errs)
reset errors
int odbc_parse_connect_string(TDS_ERRS *errs, const char *connect_string, const char *connect_string_end, TDSLOGIN *login, TDS_PARSED_PARAM *parsed_params)
Parses a connection string for SQLDriverConnect().
static const char * tds_dstr_cstr(DSTR *s)
Returns a C version (NUL terminated string) of dstr.
int strncmp(const char *str1, const char *str2, size_t count)
int strcmp(const char *str1, const char *str2)
static const char * locale
Structure to hold a string.
DSTR password
password of account login
DSTR server_name
server name (in freetds.conf)
int port
port of database service
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4