summaryrefslogtreecommitdiffstats
path: root/comm/mailnews/imap/test/unit/test_imapUrls.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
commit6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch)
treea68f146d7fa01f0134297619fbe7e33db084e0aa /comm/mailnews/imap/test/unit/test_imapUrls.js
parentInitial commit. (diff)
downloadthunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.tar.xz
thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.zip
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'comm/mailnews/imap/test/unit/test_imapUrls.js')
-rw-r--r--comm/mailnews/imap/test/unit/test_imapUrls.js31
1 files changed, 31 insertions, 0 deletions
diff --git a/comm/mailnews/imap/test/unit/test_imapUrls.js b/comm/mailnews/imap/test/unit/test_imapUrls.js
new file mode 100644
index 0000000000..e310705169
--- /dev/null
+++ b/comm/mailnews/imap/test/unit/test_imapUrls.js
@@ -0,0 +1,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();
+}