summaryrefslogtreecommitdiffstats
path: root/comm/mailnews/imap/test/unit/test_imapUrls.js
blob: e3107051696569662efa40ebaa1754d45526553f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* -*- Mode: JavaScript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
 *
 * Any copyright is dedicated to the Public Domain.
 * http://creativecommons.org/licenses/publicdomain/
 *
 * ***** END LICENSE BLOCK ***** */

// IMAP pump

setupIMAPPump();

/*
 * Test parsing of imap uri's with very large UID's.
 */

function run_test() {
  let imapS = Cc[
    "@mozilla.org/messenger/messageservice;1?type=imap"
  ].getService(Ci.nsIMsgMessageService);
  let uri = imapS.getUrlForUri(
    "imap-message://user@localhost/INBOX#4294967168"
  );
  Assert.equal(
    uri.spec,
    "imap://user@localhost:" +
      IMAPPump.server.port +
      "/fetch%3EUID%3E%5EINBOX%3E4294967168"
  );
  teardownIMAPPump();
}