@@ -856,7 +856,7 @@ static void test_send_next_command(struct test_exec_context *ctx,
856
856
struct test_command * test_cmd )
857
857
{
858
858
struct command * cmd = NULL ;
859
- const char * cmdline ;
859
+ const char * cmdline , * args ;
860
860
unsigned int cmdline_len ;
861
861
862
862
cmdline = test_cmd -> command ;
@@ -866,10 +866,10 @@ static void test_send_next_command(struct test_exec_context *ctx,
866
866
client -> client .state = STATE_APPEND ;
867
867
(void )imap_client_append_full (client , NULL , NULL , NULL ,
868
868
test_cmd_callback , & cmd );
869
- } else if (strncasecmp (cmdline , "append " , 7 ) == 0 &&
870
- !append_has_body (ctx , cmdline + 7 , cmdline_len - 7 )) {
869
+ } else if (str_begins_icase (cmdline , "append " , & args ) &&
870
+ !append_has_body (ctx , args , strlen ( args ) )) {
871
871
client -> client .state = STATE_APPEND ;
872
- (void )imap_client_append (client , cmdline + 7 , FALSE,
872
+ (void )imap_client_append (client , args , FALSE,
873
873
test_cmd_callback , & cmd );
874
874
} else {
875
875
if (test_cmd -> linenum == 0 ||
0 commit comments