LCOV - code coverage report
Current view: top level - src/ctlib/unittests - ct_command.c (source / functions) Hit Total Coverage
Test: FreeTDS coverage Lines: 6 6 100.0 %
Date: 2025-01-18 11:50:39 Functions: 1 1 100.0 %

          Line data    Source code
       1             : #include "common.h"
       2             : 
       3             : #include <cspublic.h>
       4             : 
       5             : /*
       6             :  * ct_command with CS_MORE option
       7             :  */
       8             : int
       9           8 : main(void)
      10             : {
      11           8 :         int verbose = 0;
      12             :         CS_CONTEXT *ctx;
      13             :         CS_CONNECTION *conn;
      14             :         CS_COMMAND *cmd;
      15             : 
      16           8 :         check_call(try_ctlogin, (&ctx, &conn, &cmd, verbose));
      17             : 
      18             :         /* This should not crash, also only concatenation lead to no error */
      19           8 :         check_call(ct_command, (cmd, CS_LANG_CMD, "IF 0 = 1 ", CS_NULLTERM, CS_MORE));
      20           8 :         check_call(run_command, (cmd, "SELECT 'hello'"));
      21             : 
      22           8 :         check_call(try_ctlogout, (ctx, conn, cmd, verbose));
      23             : 
      24             :         return 0;
      25             : }

Generated by: LCOV version 1.13