X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=tests%2Ftest-connection.lisp;h=25c8b733c38f76b6f2d7162d5659071c0b4be7ba;hb=0ff9631844fe6c96de64e008ec9b29f4bd1448d3;hp=86c79c3e6282b35bd0accaba43da1ed760b52ccd;hpb=c41d81c0d1233372012a1de93fcdfd6b2a6e5618;p=clsql.git diff --git a/tests/test-connection.lisp b/tests/test-connection.lisp index 86c79c3..25c8b73 100644 --- a/tests/test-connection.lisp +++ b/tests/test-connection.lisp @@ -36,4 +36,23 @@ "dbname/user@hostname") ("hostname" "dbname" "user")) +(deftest :connection/execute-command + ;;check that we can issue basic commands. + (values + (clsql-sys:execute-command "CREATE TABLE DUMMY (foo integer)") + (clsql-sys:execute-command "DROP TABLE DUMMY")) + nil nil) + +(deftest :connection/query + ;;check that we can do a basic query + (first (clsql:query "SELECT 1" :flatp t :field-names nil)) + 1) + +(deftest :connection/query-command + ;;queries that are commands (no result set) shouldn't cause breakage + (values + (clsql-sys:query "CREATE TABLE DUMMY (foo integer)") + (clsql-sys:query "DROP TABLE DUMMY")) + nil nil) + ))