summaryrefslogtreecommitdiff
path: root/lib/et/test_cases
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2005-01-06 00:16:03 -0500
committerTheodore Ts'o <tytso@mit.edu>2005-01-06 00:16:03 -0500
commit69f83f40bd577f78068ccc13e74c7b0981d6c6da (patch)
treeb3b9167d22d0fcda83b862091fea03a68c533a8f /lib/et/test_cases
parentdc8ce3463791366ac844d3f0436709511fa09c49 (diff)
downloade2fsprogs-69f83f40bd577f78068ccc13e74c7b0981d6c6da.tar.gz
Add imap_err.et to the lib/et regression test suite.
Diffstat (limited to 'lib/et/test_cases')
-rw-r--r--lib/et/test_cases/imap_err.c83
-rw-r--r--lib/et/test_cases/imap_err.et127
-rw-r--r--lib/et/test_cases/imap_err.h48
3 files changed, 258 insertions, 0 deletions
diff --git a/lib/et/test_cases/imap_err.c b/lib/et/test_cases/imap_err.c
new file mode 100644
index 00000000..f41227b2
--- /dev/null
+++ b/lib/et/test_cases/imap_err.c
@@ -0,0 +1,83 @@
+/*
+ * imap_err.c:
+ * This file is automatically generated; please do not edit it.
+ */
+
+#include <stdlib.h>
+
+static const char * const text[] = {
+ "System I/O error",
+ "Permission denied",
+ "Over quota",
+ "Too many user flags in mailbox",
+ "Mailbox has an invalid format",
+ "Operation is not supported on mailbox",
+ "Mailbox does not exist",
+ "Mailbox already exists",
+ "Invalid mailbox name",
+ "Mailbox is locked by POP server",
+ "Unknown/invalid partition",
+ "Invalid identifier",
+ "Message contains NUL characters",
+ "Message contains bare newlines",
+ "Message contains non-ASCII characters in headers",
+ "Message contains invalid header",
+ "Message has no header/body separator",
+ "Quota root does not exist",
+ "Unrecognized character set",
+ "Invalid user",
+ "Login incorrect",
+ "Anonymous login is not permitted",
+ "Unsupported quota resource",
+ "Mailbox is over quota",
+ "Mailbox is at %d%% of quota",
+ "Message %d no longer exists",
+ "Unable to checkpoint \\Seen state",
+ "Unable to preserve \\Seen state",
+ "LOGOUT received",
+ "Completed",
+ 0
+};
+
+struct error_table {
+ char const * const * msgs;
+ long base;
+ int n_msgs;
+};
+struct et_list {
+ struct et_list *next;
+ const struct error_table * table;
+};
+extern struct et_list *_et_list;
+
+const struct error_table et_imap_error_table = { text, -1904809472L, 30 };
+
+static struct et_list link = { 0, 0 };
+
+void initialize_imap_error_table(void);
+
+void initialize_imap_error_table(void) {
+ if (!link.table) {
+ link.next = _et_list;
+ link.table = &et_imap_error_table;
+ _et_list = &link;
+ }
+}
+
+/* For Heimdal compatibility */
+void initialize_imap_error_table_r(struct et_list **list);
+
+void initialize_imap_error_table_r(struct et_list **list)
+{
+ struct et_list *et, **end;
+
+ for (end = list, et = *list; et; end = &et->next, et = et->next)
+ if (et->table->msgs == text)
+ return;
+ et = malloc(sizeof(struct et_list));
+ if (et == 0)
+ return;
+ et->table = &et_imap_error_table;
+ et->next = 0;
+ *end = et;
+}
diff --git a/lib/et/test_cases/imap_err.et b/lib/et/test_cases/imap_err.et
new file mode 100644
index 00000000..33f5bbcc
--- /dev/null
+++ b/lib/et/test_cases/imap_err.et
@@ -0,0 +1,127 @@
+# imap_err.et -- Error codes for Cyrus IMAP server programs
+#
+# Copyright 1998 Carnegie Mellon University
+#
+# No warranties, either expressed or implied, are made regarding the
+# operation, use, or results of the software.
+#
+# Permission to use, copy, modify and distribute this software and its
+# documentation is hereby granted for non-commercial purposes only
+# provided that this copyright notice appears in all copies and in
+# supporting documentation.
+#
+# Permission is also granted to Internet Service Providers and others
+# entities to use the software for internal purposes.
+#
+# The distribution, modification or sale of a product which uses or is
+# based on the software, in whole or in part, for commercial purposes or
+# benefits requires specific, additional permission from:
+#
+# Office of Technology Transfer
+# Carnegie Mellon University
+# 5000 Forbes Avenue
+# Pittsburgh, PA 15213-3890
+# (412) 268-4387, fax: (412) 268-7395
+# tech-transfer@andrew.cmu.edu
+#
+error_table imap
+
+ec IMAP_IOERROR,
+ "System I/O error"
+
+ec IMAP_PERMISSION_DENIED,
+ "Permission denied"
+
+ec IMAP_QUOTA_EXCEEDED,
+ "Over quota"
+
+ec IMAP_USERFLAG_EXHAUSTED,
+ "Too many user flags in mailbox"
+
+ec IMAP_MAILBOX_BADFORMAT,
+ "Mailbox has an invalid format"
+
+ec IMAP_MAILBOX_NOTSUPPORTED,
+ "Operation is not supported on mailbox"
+
+ec IMAP_MAILBOX_NONEXISTENT,
+ "Mailbox does not exist"
+
+ec IMAP_MAILBOX_EXISTS,
+ "Mailbox already exists"
+
+ec IMAP_MAILBOX_BADNAME,
+ "Invalid mailbox name"
+
+ec IMAP_MAILBOX_POPLOCKED,
+ "Mailbox is locked by POP server"
+
+ec IMAP_PARTITION_UNKNOWN,
+ "Unknown/invalid partition"
+
+ec IMAP_INVALID_IDENTIFIER,
+ "Invalid identifier"
+
+ec IMAP_MESSAGE_CONTAINSNULL,
+ "Message contains NUL characters"
+
+ec IMAP_MESSAGE_CONTAINSNL,
+ "Message contains bare newlines"
+
+ec IMAP_MESSAGE_CONTAINS8BIT,
+ "Message contains non-ASCII characters in headers"
+
+ec IMAP_MESSAGE_BADHEADER,
+ "Message contains invalid header"
+
+ec IMAP_MESSAGE_NOBLANKLINE,
+ "Message has no header/body separator"
+
+ec IMAP_QUOTAROOT_NONEXISTENT,
+ "Quota root does not exist"
+
+# Following only used for internationalization of error messages
+
+ec IMAP_UNRECOGNIZED_CHARSET,
+ "Unrecognized character set"
+
+ec IMAP_INVALID_USER,
+ "Invalid user"
+
+ec IMAP_INVALID_LOGIN,
+ "Login incorrect"
+
+ec IMAP_ANONYMOUS_NOT_PERMITTED,
+ "Anonymous login is not permitted"
+
+ec IMAP_UNSUPPORTED_QUOTA,
+ "Unsupported quota resource"
+
+# Following used for internationalization of untagged OK/NO responses
+
+ec IMAP_NO_OVERQUOTA,
+ "Mailbox is over quota"
+
+ec IMAP_NO_CLOSEQUOTA,
+ "Mailbox is at %d%% of quota"
+
+ec IMAP_NO_MSGGONE,
+ "Message %d no longer exists"
+
+ec IMAP_NO_CHECKSEEN,
+ "Unable to checkpoint \\Seen state"
+
+ec IMAP_NO_CHECKPRESERVE,
+ "Unable to preserve \\Seen state"
+
+# Following used for internationalization of untagged BYE response
+
+ec IMAP_BYE_LOGOUT,
+ "LOGOUT received"
+
+# Following used for internationalization of tagged OK response
+
+ec IMAP_OK_COMPLETED,
+ "Completed"
+
+end
diff --git a/lib/et/test_cases/imap_err.h b/lib/et/test_cases/imap_err.h
new file mode 100644
index 00000000..17664c4e
--- /dev/null
+++ b/lib/et/test_cases/imap_err.h
@@ -0,0 +1,48 @@
+/*
+ * imap_err.h:
+ * This file is automatically generated; please do not edit it.
+ */
+
+#include <et/com_err.h>
+
+#define IMAP_IOERROR (-1904809472L)
+#define IMAP_PERMISSION_DENIED (-1904809471L)
+#define IMAP_QUOTA_EXCEEDED (-1904809470L)
+#define IMAP_USERFLAG_EXHAUSTED (-1904809469L)
+#define IMAP_MAILBOX_BADFORMAT (-1904809468L)
+#define IMAP_MAILBOX_NOTSUPPORTED (-1904809467L)
+#define IMAP_MAILBOX_NONEXISTENT (-1904809466L)
+#define IMAP_MAILBOX_EXISTS (-1904809465L)
+#define IMAP_MAILBOX_BADNAME (-1904809464L)
+#define IMAP_MAILBOX_POPLOCKED (-1904809463L)
+#define IMAP_PARTITION_UNKNOWN (-1904809462L)
+#define IMAP_INVALID_IDENTIFIER (-1904809461L)
+#define IMAP_MESSAGE_CONTAINSNULL (-1904809460L)
+#define IMAP_MESSAGE_CONTAINSNL (-1904809459L)
+#define IMAP_MESSAGE_CONTAINS8BIT (-1904809458L)
+#define IMAP_MESSAGE_BADHEADER (-1904809457L)
+#define IMAP_MESSAGE_NOBLANKLINE (-1904809456L)
+#define IMAP_QUOTAROOT_NONEXISTENT (-1904809455L)
+#define IMAP_UNRECOGNIZED_CHARSET (-1904809454L)
+#define IMAP_INVALID_USER (-1904809453L)
+#define IMAP_INVALID_LOGIN (-1904809452L)
+#define IMAP_ANONYMOUS_NOT_PERMITTED (-1904809451L)
+#define IMAP_UNSUPPORTED_QUOTA (-1904809450L)
+#define IMAP_NO_OVERQUOTA (-1904809449L)
+#define IMAP_NO_CLOSEQUOTA (-1904809448L)
+#define IMAP_NO_MSGGONE (-1904809447L)
+#define IMAP_NO_CHECKSEEN (-1904809446L)
+#define IMAP_NO_CHECKPRESERVE (-1904809445L)
+#define IMAP_BYE_LOGOUT (-1904809444L)
+#define IMAP_OK_COMPLETED (-1904809443L)
+extern const struct error_table et_imap_error_table;
+extern void initialize_imap_error_table(void);
+
+/* For compatibility with Heimdal */
+extern void initialize_imap_error_table_r(struct et_list **list);
+
+#define ERROR_TABLE_BASE_imap (-1904809472L)
+
+/* for compatibility with older versions... */
+#define init_imap_err_tbl initialize_imap_error_table
+#define imap_err_base ERROR_TABLE_BASE_imap