From 05aaadc66b77c9f080b590fa19938de8ec80691d Mon Sep 17 00:00:00 2001 From: Michael Zucci Date: Fri, 24 Nov 2000 07:06:45 +0000 Subject: little util to scan mailboxes for any and every address they contain. * tests/data/getaddr.pl: little util to scan mailboxes for any and every address they contain. * tests/message/test2.c (main): Added a bunch of stuff to test decoding/reencoding/etc of internationalised addresses. * tests/message/lib/address-data.h: Copy of some unicode/other testing data. **Beware** of editing this file in emacs, it'll probably try and convert all the characters to something unusable. * tests/lib/camel-test.c (camel_test_break): Add a debugger hook point. * camel-mime-utils.c (quoted_encode): Check for space and convert to _ separately. (header_decode_mailbox): Fixed the 'check comments for realname' code, problem was the domain getting code was skipping all whitespace/comments before we could get a look-in. This is approximate but fairly robust. (header_decode_text): Dont use the c-type isspace func here, we want a specific whitespace only. (header_decode_text): If we have decoded words next to each other, do not insert whitespaces between them, which is what rfc2047 requires. (header_decode_text): Make c unsigned too. svn path=/trunk/; revision=6658 --- camel/tests/lib/address-data.h | 93 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 camel/tests/lib/address-data.h (limited to 'camel/tests/lib/address-data.h') diff --git a/camel/tests/lib/address-data.h b/camel/tests/lib/address-data.h new file mode 100644 index 0000000000..acecac596a --- /dev/null +++ b/camel/tests/lib/address-data.h @@ -0,0 +1,93 @@ +/* BE WARY of editing this file with emacs. + Otherwise it might be smart and try to re-encode everything, which + you really do not want +*/ + +static struct _a { + int count; + char *addr; + char *utf8; /* the utf8 in this table was generated by camel itself. As a result i'm making the assumption it + was right when it was created. It also depends on the format of ::format(),. which is likely to + change, to handle other bugs ! */ +} test_address[] = { + { 1, "\"=?ISO-8859-1?Q?David_Guti=E9rrez_Magallanes?=\" ", "David Gutiérrez Magallanes " }, + { 1, "\"=?iso-8859-1?Q?Jos=E9?= Antonio Milke G.\" ", "José Antonio Milke G. " }, + { 1, "\"=?iso-8859-2?Q?Hi-Fi_Internert_market_=3D_1.Virtu=E1ln=ED_Internetov=E9_H?= =?iso-8859-2?Q?i-Fi_Studio?=\" ", "Hi-Fi Internert market = 1.Virtuální Internetové Hi-Fi Studio " }, + { 3, "\"James M. Cape\" , =?iso-8859-1?Q?Joaqu=EDn_Cuenca_Abela?= , gnome-hackers@nuclecu.unam.mx", "James M. Cape , Joaquín Cuenca Abela , gnome-hackers@nuclecu.unam.mx" }, + { 1, "=?ISO-8859-1?Q?David_Guti=E9rrez_Magallanes?= ", "David Gutiérrez Magallanes " }, + { 1, "=?ISO-8859-2?Q?Tomasz_K=B3oczko?= ", "Tomasz Kłoczko " }, + { 1, "=?ISO-8859-2?Q?Vladim=EDr_Solnick=FD?= ", "Vladimír Solnický " }, + { 1, "=?iso-8859-1?Q?=22S=F6rensen=2C_Daniel=22?= ", "\"Sörensen, Daniel\" " }, + { 1, "=?iso-8859-1?Q?=C1=C2=AAQ=A7=CA?= ", "ÁªQ§Ê " }, + { 1, "=?iso-8859-1?Q?=C1=C2=AAQ=A7=CA?= ", "ÁªQ§Ê " }, + { 1, "=?iso-8859-1?Q?=C1kos?= Valentinyi ", "Ákos Valentinyi " }, + { 1, "=?iso-8859-1?Q?Joaqu=EDn?= Cuenca Abela ", "Joaquín Cuenca Abela " }, + { 2, "=?iso-8859-1?Q?Joaqu=EDn?= Cuenca Abela , gnome-hackers@nuclecu.unam.mx", "Joaquín Cuenca Abela , gnome-hackers@nuclecu.unam.mx" }, + { 1, "=?iso-8859-1?Q?Joaqu=EDn_Cuenca_Abela?= ", "Joaquín Cuenca Abela " }, + { 1, "=?iso-8859-1?Q?Juantom=E1s=20Garc=EDa?= ", "Juantomás García " }, + { 1, "=?iso-8859-1?Q?Kenneth_ll=E9phaane_Christiansen?= ", "Kenneth lléphaane Christiansen " }, + { 1, "=?iso-8859-1?Q?Kjell_Tage_=D8hman?= ", "Kjell Tage Øhman " }, + { 1, "=?iso-8859-1?Q?Martin_Norb=E4ck?= ", "Martin Norbäck " }, + { 1, "=?iso-8859-1?Q?P=E5llen?= ", "Pållen " }, + { 1, "=?iso-8859-1?Q?Ville_P=E4tsi?= ", "Ville Pätsi " }, + { 1, "=?iso-8859-1?q?Joaqu=EDn?= Cuenca Abela ", "Joaquín Cuenca Abela " }, + { 1, "=?iso-8859-2?Q?Dra=BEen_Ka=E8ar?= ", "Dražen Kačar " }, + /* yep this is right, this isn't valid so doesn't decode at all */ + { 1, "=?windows-1250?Q? \"Jaka Mo=E8nik\" ?= ", "=?windows-1250?Q? Jaka Mo=E8nik ?= " }, + { 3, "George , Juantomas =?ISO-8859-1?Q?Garc=C3=83=C2=ADa?= , gnome-hackers@gnome.org", "George , Juantomas García , gnome-hackers@gnome.org" }, + { 7, "Jon Trowbridge , gnome-1.4-list@gnome.org, gnome-devel-list@gnome.org, gnome-hackers@gnome.org, Dom Lachowicz , =?iso-8859-1?Q?Joaqu=EDn_Cuenca_Abela?= , sam th ", "Jon Trowbridge , gnome-1.4-list@gnome.org, gnome-devel-list@gnome.org, gnome-hackers@gnome.org, Dom Lachowicz , Joaquín Cuenca Abela , sam th " }, + { 6, "Jon Trowbridge , gnome-1.4-list@gnome.org, gnome-devel-list@gnome.org, gnome-hackers@gnome.org, Dom Lachowicz , =?iso-8859-1?Q?Joaqu=EDn_Cuenca_Abela?= ", "Jon Trowbridge , gnome-1.4-list@gnome.org, gnome-devel-list@gnome.org, gnome-hackers@gnome.org, Dom Lachowicz , Joaquín Cuenca Abela " }, + { 1, "Kai =?iso-8859-1?Q?Gro=DFjohann?= ", "Kai Großjohann " }, + { 1, "Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai =?iso-8859-1?q?Gro=DFjohann?=)", "Kai Großjohann " }, + { 1, "Rickard =?iso-8859-1?Q?Nordstr=F6m?= ", "Rickard Nordström " }, + { 1, "Tomasz =?iso-8859-2?q?K=B3oczko?= ", "Tomasz Kłoczko " }, + { 1, "VALCKE =?iso-8859-1?Q?C=E9dric?= ", "VALCKE Cédric " }, + { 1, "Ville =?iso-8859-1?q?P=E4tsi?= ", "Ville Pätsi " }, + { 1, "david@iiia.csic.es (=?ISO-8859-1?Q?David_Guti=E9rrez_Magallanes?=)", "David Gutiérrez Magallanes " }, + { 1, "kloczek@rudy.mif.pg.gda.pl (=?ISO-8859-2?Q?Tomasz_K=B3oczko?=)", "Tomasz Kłoczko " }, + { 1, "lassehp@imv.aau.dk (Lasse =?ISO-8859-1?Q?Hiller=F8e?= Petersen)", "Lasse Hillerøe Petersen " }, + { 1, "ysato@etl.go.jp (Yutaka Sato =?ISO-2022-JP?B?GyRAOjRGI0stGyhK?=)", "Yutaka Sato 佐藤豊 " }, +}; + +static struct _l { + char *type; + char *line; +} test_lines[] = { + /* commented out unsupported charsets - FIXME: camel should somehow handle this, although it can't really of course */ + /*{ "windows-1251", " .\n ?" },*/ + { "iso-8859-1", "Omple les miniatures de la finestra amb contingut de la pantalla" }, + { "ISO-8859-2", "Sprvce oken hbe s okrajem okna\n(AfterStep, Enlightenment, FVWM, IceWM, Sawmill)" }, + { "ISO-8859-1", "Vindueshndtering flytter dekorationsvindue istedet\n(AfterStep, Enlightenment, FVWM, IceWM, Sawfish)" }, + { "ISO-8859-1", "Vorschaubilder der Fenster mit dem Bildschirminhalt ausfllen" }, + { "iso-8859-7", " (-)" }, + { "iso-8859-1", "You've chosen to disable the startup hint.\nTo re-enable it, choose \"Startup Hint\"\nin the GNOME Control Centre" }, + { "iso-8859-1", "El aplique de reloj muestra en su panel la fecha y la hora de forma simple \ny ligero " }, + { "iso-8859-1", "Applet ei vasta salvestusksule.\nKas peaks ta niisama sulgema, vi veel ootama?" }, + { "iso-8859-1", "Lehio kudeatzaileak lehioaren dekorazaioa mugiarazten\n(AfterStep, Enlightenment, FVWM, IceWM, Sawmill)" }, + { "iso-8859-15", "Nyt sovellukset, joiden ikkunoista on nkyvill vain otsikkopalkki" }, + { "ISO-8859-1", "Afficher les tches qui ne sont pas dans la liste des fentres" }, + { "iso-8859-1", "Nl applet ag tabhair freagra ar iarratas sbhil.\nBain amach an applet n lean ar fnacht?" }, + { "iso-8859-1", "Amosa-las tarefas agochadas da lista de fiestras (SKIP-WINLIST)" }, + { "iso-8859-2", "Az ablakkezel a dekorcit mozgassa az ablak helyett\n(AfterStep, Enlightenment, FVWM, IceWM, SawMill)" }, + { "iso-8859-1", "Riempi la finestra delle anteprime con il contenuto dello schermo" }, + { "euc-jp", "ɥޥ͡Ͼꥦɥư\n(AfterStep, Enlightenment, FVWM, IceWM, Sawfish)" }, + { "euc-kr", "â ڰ ٹ â ̵\n(AfterStep, Enlightenment, FVWM, IceWM, Sawmill)" }, + { "iso-8859-13", "Priedas neatsakinja praym isisaugoti.\nPaalinti pried ar laukti toliau?" }, + { "iso-8859-1", "Window manager verplaatst dekoratie\n(AfterStep, Enlightenment, FVWM, IceWM, Sawmill)" }, + { "iso-8859-1", "Vindushndtereren flytter dekorasjonsvinduet i stedet\n(AfterStep, Enlightenment, FVWM, IceWM, Sawfish)" }, + { "iso-8859-2", "Przemieszczanie dekoracji zamiast okna\n(AfterStep, Enlightenment, FVWM, IceWM, Sawmill)" }, + { "iso-8859-1", "Este programa responsvel por executar outras aplicaes, embeber pequenos applets, a paz no mundo e crashes aleatrios do X." }, + { "iso-8859-1", "Mostrar tarefas que se escondem da lista de janelas (SKIP-WINLIST)" }, + { "koi8-r", " " }, + { "iso-8859-2", "Sprvca okien presva okraje okien\n(AfterStep, Enlightenment, FVWM, IceWM, Sawfish)" }, + { "iso-8859-2", "Kai posle, ki se skrivajo pred upravljalnik oken (SKIP-WINLIST)" }, + { "iso-8859-5", "Window a\n(AfterStep, Enlightenment, FVWM, IceWM, Sawmill)" }, + { "iso-8859-2", "Window menadzeri pomera dekoracioni prozor umesto toga\n(AfterStep, Enlightenment, FVWM, IceWM, Sawmill)" }, + { "iso-8859-1", "Fnsterhanteraren flyttar dekorationsfnstret istllet\n(AfterStep, Enlightenment, FVWM, IceWM, Sawfish)" }, + /*{ "TSCII", "츼- ¡ 츼 (츼--Ţ)" },*/ + { "iso-8859-9", "Kaydetme isteine bir uygulak cevap vermiyor .\nUygula sileyim mi , yoksa bekleyeyim mi ?" }, + { "koi8-u", "ͦ æ ͦ צ\n(AfterStep, Enlightenment, FVWM, IceWM, Sawfish)" }, + { "iso-8859-1", "Cwand on scriftr est bodj fo, li scriftr t totes\nles apliketes dvins sont pierdowes. Bodj ci scriftr chal?" }, + { "gb2312", "ǨƵװδڹ(AfterStep, Enlightenment, FVWM, IceWM, SawMill)" }, + { "big5", "޲z̥uʸ˹\n(AfterStep, Enlightenment, FVWM, IceWM, Sawmill)" }, +}; -- cgit v1.2.3