Skip to content

Commit

Permalink
IMAP UIDONLY tests: properly escape [] in regex
Browse files Browse the repository at this point in the history
  • Loading branch information
ksmurchison committed Nov 13, 2023
1 parent f8fa74a commit af59c82
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cassandane/tiny-tests/UIDonly/copy-move
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ sub test_copy_move
$res = $imaptalk->move(1, $folder);
$self->assert_str_equals('bad', $imaptalk->get_last_completion_response());
# get_response_code() doesn't (yet) handle [UIDREQUIRED]
$self->assert_matches(qr/[UIDREQUIRED]/, $imaptalk->get_last_error());
$self->assert_matches(qr/\[UIDREQUIRED\]/, $imaptalk->get_last_error());

xlog $self, "UID MOVE";
$res = $imaptalk->_imap_cmd('UID MOVE', 1, 'vanished', '1', $folder);
Expand Down
2 changes: 1 addition & 1 deletion cassandane/tiny-tests/UIDonly/fetch
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ sub test_fetch
$res = $imaptalk->fetch('1:*', '(UID FLAGS)');
$self->assert_str_equals('bad', $imaptalk->get_last_completion_response());
# get_response_code() doesn't (yet) handle [UIDREQUIRED]
$self->assert_matches(qr/[UIDREQUIRED]/, $imaptalk->get_last_error());
$self->assert_matches(qr/\[UIDREQUIRED\]/, $imaptalk->get_last_error());

my %fetched= {};
my %handlers =
Expand Down
2 changes: 1 addition & 1 deletion cassandane/tiny-tests/UIDonly/search
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ sub test_search
$res = $imaptalk->search('not', 'deleted');
$self->assert_str_equals('bad', $imaptalk->get_last_completion_response());
# get_response_code() doesn't (yet) handle [UIDREQUIRED]
$self->assert_matches(qr/[UIDREQUIRED]/, $imaptalk->get_last_error());
$self->assert_matches(qr/\[UIDREQUIRED\]/, $imaptalk->get_last_error());

xlog $self, "attempt UID SEARCH with msgnos";
$res = $imaptalk->_imap_cmd('UID SEARCH', 1, 'search', '1:10');
Expand Down
2 changes: 1 addition & 1 deletion cassandane/tiny-tests/UIDonly/store
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ sub test_store
$imaptalk->store('1,6', '+FLAGS', '(\\Deleted)');
$self->assert_str_equals('bad', $imaptalk->get_last_completion_response());
# get_response_code() doesn't (yet) handle [UIDREQUIRED]
$self->assert_matches(qr/[UIDREQUIRED]/, $imaptalk->get_last_error());
$self->assert_matches(qr/\[UIDREQUIRED\]/, $imaptalk->get_last_error());

my %fetched= {};
my %handlers =
Expand Down

0 comments on commit af59c82

Please sign in to comment.