diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2017-11-04 01:17:16 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2017-11-24 05:06:39 +0300 |
commit | 43d743e75b7b747341b9a5c36a933b490548bebb (patch) | |
tree | 03d3c056929c9b8f51dd5d7cbd42c544f14c591b /tests/basic | |
parent | 9b1a5c3c0633240b2da16e57503cb67c392fdb3d (diff) |
Add implementation
Diffstat (limited to 'tests/basic')
-rw-r--r-- | tests/basic/buildfile | 7 | ||||
-rw-r--r-- | tests/basic/driver.c | 23 | ||||
-rw-r--r-- | tests/basic/testscript | 5 |
3 files changed, 35 insertions, 0 deletions
diff --git a/tests/basic/buildfile b/tests/basic/buildfile new file mode 100644 index 0000000..5f6854e --- /dev/null +++ b/tests/basic/buildfile @@ -0,0 +1,7 @@ +# file : tests/basic/buildfile +# copyright : Copyright (c) 2009-2017 Code Synthesis Tools CC +# license : LGPLv2.1; see accompanying COPYING file + +import libs = libmariadb%lib{mariadb} + +exe{driver}: {h c}{*} $libs test{testscript} diff --git a/tests/basic/driver.c b/tests/basic/driver.c new file mode 100644 index 0000000..faac915 --- /dev/null +++ b/tests/basic/driver.c @@ -0,0 +1,23 @@ +/* + * file : tests/basic/driver.c + * copyright : Copyright (c) 2009-2017 Code Synthesis Tools CC + * license : LGPLv2.1; see accompanying COPYING file + */ + +#include <stdio.h> + +#include <mysql/mysql.h> + +int +main () +{ + if (mysql_library_init (0, NULL, NULL)) + { + fprintf (stderr, "failed to initialize\n"); + return 1; + } + + printf ("libmariadb version: %s\n", mysql_get_client_info ()); + mysql_library_end (); + return 0; +} diff --git a/tests/basic/testscript b/tests/basic/testscript new file mode 100644 index 0000000..637734d --- /dev/null +++ b/tests/basic/testscript @@ -0,0 +1,5 @@ +# file : tests/basic/testscript +# copyright : Copyright (c) 2016-2017 Code Synthesis Ltd +# license : LGPLv2.1; see accompanying COPYING file + +$* >~'/libmariadb version: \d+\.\d+\.\d+(-.+)?/' |