From cf4ca10f51a0809ba81a86ce6916f6f32a5ee840 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Wed, 25 Sep 2002 23:25:05 +0000 Subject: Added a test suite for camel-mime-filter-charset and added a few test cases for it. input charset files should be in the form "charset-%s.%d.in" where %s is the charset name that the file is in and %d is just some number as in a sequence id. Mostly just so we can have multiple test files per charset svn path=/trunk/; revision=18227 --- camel/tests/mime-filter/.cvsignore | 2 +- camel/tests/mime-filter/Makefile.am | 15 +- camel/tests/mime-filter/charset-gb2312.0.in | 448 ++++++++++++++++++++++ camel/tests/mime-filter/charset-gb2312.0.out | 448 ++++++++++++++++++++++ camel/tests/mime-filter/charset-iso-2022-jp.0.in | 5 + camel/tests/mime-filter/charset-iso-2022-jp.0.out | 5 + camel/tests/mime-filter/test-charset.c | 140 +++++++ camel/tests/mime-filter/test-crlf.c | 7 +- 8 files changed, 1059 insertions(+), 11 deletions(-) create mode 100644 camel/tests/mime-filter/charset-gb2312.0.in create mode 100644 camel/tests/mime-filter/charset-gb2312.0.out create mode 100644 camel/tests/mime-filter/charset-iso-2022-jp.0.in create mode 100644 camel/tests/mime-filter/charset-iso-2022-jp.0.out create mode 100644 camel/tests/mime-filter/test-charset.c (limited to 'camel/tests/mime-filter') diff --git a/camel/tests/mime-filter/.cvsignore b/camel/tests/mime-filter/.cvsignore index c1f16ee7d4..f8d627b581 100644 --- a/camel/tests/mime-filter/.cvsignore +++ b/camel/tests/mime-filter/.cvsignore @@ -4,5 +4,5 @@ Makefile.in .libs *.lo *.la -test-stripheader test-crlf +test-charset \ No newline at end of file diff --git a/camel/tests/mime-filter/Makefile.am b/camel/tests/mime-filter/Makefile.am index bceee243eb..f2f686d593 100644 --- a/camel/tests/mime-filter/Makefile.am +++ b/camel/tests/mime-filter/Makefile.am @@ -19,14 +19,19 @@ LDADD = \ $(INTLLIBS) \ $(EVOLUTION_MAIL_LIBS) -EXTRA_DIST = \ - crlf-1.in \ - crlf-1.out +EXTRA_DIST = \ + crlf-1.in \ + crlf-1.out \ + charset-iso-2022-jp.0.in \ + charset-iso-2022-jp.0.out \ + charset-gb2312.0.in \ + charset-gb2312.0.out check_PROGRAMS = \ - test-crlf + test-crlf \ + test-charset -TESTS = test-crlf +TESTS = test-crlf test-charset diff --git a/camel/tests/mime-filter/charset-gb2312.0.in b/camel/tests/mime-filter/charset-gb2312.0.in new file mode 100644 index 0000000000..82520ac916 --- /dev/null +++ b/camel/tests/mime-filter/charset-gb2312.0.in @@ -0,0 +1,448 @@ + + + + +一站式的贸易、库存及会计管理系统 An all-in-one solution for trading, inventory, accounting management + + + + + + + + + + + + + + + + +
+

+ + + + + TRADEdotNET + +  
+
是一站式的贸易、库存及会计管理系统,助您精简周而复始的资料输入、数据处理及各类报价、发票、存仓、日记帐、传票、报表等所需的文件行政工作,让您更有效地管理贸易、库存及会计事务。

+

+ + + + + TRADEdotNET + +  
+ What's the most annoying part during your + work? +
Endless repetitive data + entry, calculation and paper work on quotation, invoice, inventory + management, daily voucher, journal and reporting? Once you have installed + TRADEdotNET, all of these + annoying work will never appear in your office again!
+ TRADEdotNET
is an all-in-one solution for trading, inventory, + accounting management. In the TRADEdotNET  + environment, all data can be continuously retrieved and reused. This will + help you for minimizing time consumed on data entry and enhancing + efficiency.

+ + TRADEdotNET + 分别由组系统组成:贸易订单管理、库存管理及会计系统 + + TRADEdotNET + Containing Trading Management + Module, Inventory Management Module and Accounting Management Module.
+

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + TRADEdotNET + 的优点
+
+  简易系统登入 + +
+
+

+ 简单易明的操作流程图显示整个系统的主要流程,引导用户顺利完成每一个步骤。用户只须按下流程图的图像,即系统快捷方式,便可进入特定的功能画面。
+ + +

+ + + + + TRADEdotNET + Highlights :
+
+ +  Easy Access + +
+
+

+ A Road Map showing the user-friendly system + flow guides users throughout all steps. User can click on the menu icons, + which act as shortcuts, and enter into the desired function.

+
+  完善的查询搜寻器 + +
+
+
+
+ 当员工回答客户查询或发出订单,经常需时翻查以往交易纪录,这个过程不仅浪费时间,万一回答不准确,更可能令您从此失去这宝贵的客户。查询搜寻器多种不同的实时查询功能,能快速搜寻所需的数据纪录,只要用户输入客户编号、货品编号、发票日期等其中一项搜寻参数,搜寻结果随即显示。
+
+ +  Perfect On-line Enquiry + +
+
+
+
+ Under many circumstances, staff also need to + retrieve past transaction history for handing customer enquiry or placing + an order, however they cannot get the required information immediately and + this may drive away the customers. On-line Enquiry engine enables staff to + check past transaction with searching parameters such as key words, client + code, item code, invoice date. +
+  文件输入 +
+
+ 系统的总帐接口设计以常用的传票为蓝本,用户无需费时重新适应不同日记帐格式,而且能更有效率地处理日常会计帐项数据输入程序。
+ +  Input + Template +
+
+ The data entry journal interface is similar + to paper voucher, so that users can handle their daily accounting + transaction as they used to, yet more efficient.
+ +  无限纪录储存  
+
+ 系统容量强大,不设纪录储存年期上限,因此用户可以随时查阅任何时期的交易纪录。 +
+
+ + +  Unlimited + Data Record  
+
+ The system can store unlimited number of + records, so that users can retrieve data of any time whenever they need + it.
+  系统登入监控 +
+
+
+ 先进的登入监控系统保障(机密)数据只供授权用户查阅,系统管理员亦可以因应用户的职级而设定个别用户的阅览权限。
+ +  Login Control +
+
+
+ Advanced access control ensures access right + is only granted to authorized users. System administrator can also define + access level of each user according to their capacity, so that confidential + information can only be retrieved and viewed by senior management.
+  自选报表格式 +
+
+
+ 系统报表以开放式设计,只需要配合Seagate Crystal Report (另购),即可自行设计报表格式或增加报表。
+ +  Customize Report +
+
+
+ The system is designed with an open architecture + format. When the system is used with  Seagate Crystal Report Software, Users can + customize report content and format of the system.
+ +  多向列卬报表工具
+
+
+
+ 超过80%的报表可以MS Excel/Word格式输出,按需要而制作图表供数据分析之用。
+ 报表可以MS Excel/Word等格式独立输出或以电邮附带传送给有关人员。
+ +  Multi-Report Export Tools
+
+
+
+ Over 80% of reports can be exported to MS + Excel /  Word and data can be translated into graphs and tables for + further analysis.
+ Reports can also be export to MS Excel / Word format independently or send + to email client with attachment directly.
+  国际互联支持 +
+
+
+
+ 为了配合不少贸易公司于国内或东南亚设厂或分公司而需要数据数据互通,
TRADEdotNET + + 提供全面安全的整合平台,安装 TRADEdotNET 互联网支持附件,透过互联网,用户即可随时随地以安装了 + TRADEdotNET + + 的标准 MS 操作系统登入使用。
+ +  Internet Ready +
+
+
+
+ To facilitate data exchange between trading companies and their offices in + the Mainland China or Southeast Asia Country,
+ + Install and makes use of TRADEdotNET + Internet Kit  to provide a secured platform enabling user + to access the data from different locations anytime through the internet + with TRADEdotNET + + system.
+  多种数据库支持 +
+
+
+
+ 为了配合不同大小公司的本身需要,
TRADEdotNET 提供不同数据库版本以供选择。已推出有 MS Access、MS SQL,即将推出有 Oracle 及其它数据库。
+  
+ +  Multi-Database Format +
+
+
+
+
TRADEdotNET + + enables user to select + different database format versions to fit their company requirements. Now + users can choose from MS + Access and MS SQL version.  Oracle and other database formats are coming soon.
+  其它支持功能 +
+
+
+ 支持多用户,支持多公司,支持多货币,支持多库存,支持多语言(中文/英文) +
+ +  Multiple Functionality +
+
+
+ Support multi-users, multi-companies, + multi-currencies, multi-inventory, multi-languages (Chinese / English).
+ + +  系统要求 + +
+

+ 工作台
+ Intel Pentium II (或以上) Processor PC
+ Windows 98, ME, 2000 或 Windows NT 4.0
+ 最少用 64 MB RAM,推荐用128MB
+ 256色或以上之SVGA显示器
+ 50MB硬盘空间
+ Windows 98, ME, 2000 或 Windows NT 4.0 支持之打印机
+ + + +  System + Requirements + + +
+

+ + Workstation
+ Intel Pentium II (or above) Processor PC
+ Windows 98, ME, 2000 or Windows NT 4.0
+ 64MB RAM + minimum, 128MB + recommended
+ 256 color SVGA display or higher
+ 50MB free Hard Disk
+ Printers + supported by + Windows 98, ME, 2000 或 Windows NT 4.0
+  
+ +  服务范围 + +
+
+ 系统示范
+      免费上门作系统示范 + 。
+
+ 系统安装
+      系统安装会由本公司专业工程师负责 + 。
+
+ 数据备份及还原
+      免费为客户设定数据备份及还原按钮,以配合客户之‘备份设备’。
+
+ 度身订做文件式样
+      为客户度身订做文件式样,提高公司形象(另费)。
+
+ 系统执行
+      为各机构设定系统流程表及监察各部门的执行情况 + 。
+
+ 用户培训
+      用户培训可设在客户办公室,而且不限次数 + 。
+
+ 系统咨询热线
+      提供有效直接的热线咨询服务,处理系统疑难 + 。
+
+ 系统保养
+      半年免费保养 + ;
+      于保养期内免费为客户作系统提升 + 。
+ +  Services + Provided + +
+
+ System Demonstration
+      Free-of-charge system demonstration in client's office
+
+ System Installation
+      + On-site + installation + by our + professional + engineers
+
+ Backup/Restore
+      Setups of backup and restore icons associated with client's backup device (e.g. Zip Drive, MO)
+
+ Tailored Format
+      Tailored designs on document formats to highlight and promote company image
+
+ System Implementation
+      + Implementation + procedures + customized for + each + organization
+
+ User Training
+      Unlimited training is provided in the client's office +
+
+ Hot-line Enquiry
+      Efficient hot-line support for all system enquiries
+
+ System Maintenance
+      Half-a-year free maintenance
+      Free + upgrade + services + throughout + warranty + periods
+
+
+ + + + +
+
+ 欢 迎 预 约 示 范 请电 : (852) 2591 9377

精 讯 国 际 有 + 限 公 司  Superdata International Ltd.
+ Tel: (852) 2591 9377

+

+ + + *All prices, + conditions and + system + specifications + are subject to + change without + prior notice. + 所有价格,条规及系统规格之修改,将不另行通知。 + + 

+ + diff --git a/camel/tests/mime-filter/charset-gb2312.0.out b/camel/tests/mime-filter/charset-gb2312.0.out new file mode 100644 index 0000000000..8dcae6bdfc --- /dev/null +++ b/camel/tests/mime-filter/charset-gb2312.0.out @@ -0,0 +1,448 @@ + + + + +涓绔欏紡鐨勮锤鏄撱佸簱瀛樺強浼氳绠$悊绯荤粺 An all-in-one solution for trading, inventory, accounting management + + + + + + + + + + + + + + + + +
+

+ + + + + TRADEdotNET + +  
+
鏄竴绔欏紡鐨勮锤鏄撱佸簱瀛樺強浼氳绠$悊绯荤粺锛屽姪鎮ㄧ簿绠鍛ㄨ屽濮嬬殑璧勬枡杈撳叆銆佹暟鎹鐞嗗強鍚勭被鎶ヤ环銆佸彂绁ㄣ佸瓨浠撱佹棩璁板笎銆佷紶绁ㄣ佹姤琛ㄧ瓑鎵闇鐨勬枃浠惰鏀垮伐浣滐紝璁╂偍鏇存湁鏁堝湴绠$悊璐告槗銆佸簱瀛樺強浼氳浜嬪姟銆

+

+ + + + + TRADEdotNET + +  
+ What's the most annoying part during your + work? +
Endless repetitive data + entry, calculation and paper work on quotation, invoice, inventory + management, daily voucher, journal and reporting? Once you have installed + TRADEdotNET, all of these + annoying work will never appear in your office again!
+ TRADEdotNET
is an all-in-one solution for trading, inventory, + accounting management. In the TRADEdotNET  + environment, all data can be continuously retrieved and reused. This will + help you for minimizing time consumed on data entry and enhancing + efficiency.

+ + TRADEdotNET + 鍒嗗埆鐢缁勭郴缁熺粍鎴愶細璐告槗璁㈠崟绠$悊銆佸簱瀛绠$悊鍙婁細璁$郴缁 + + TRADEdotNET + Containing Trading Management + Module, Inventory Management Module and Accounting Management Module.
+

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + TRADEdotNET + 鐨勪紭鐐
+
+  绠鏄撶郴缁熺櫥鍏 + +
+
+

+ 绠鍗曟槗鏄庣殑鎿嶄綔娴佺▼鍥炬樉绀烘暣涓郴缁熺殑涓昏娴佺▼锛屽紩瀵肩敤鎴烽『鍒╁畬鎴愭瘡涓涓楠ゃ傜敤鎴峰彧椤绘寜涓嬫祦绋嬪浘鐨勫浘鍍忥紝鍗崇郴缁熷揩鎹锋柟寮忥紝渚垮彲杩涘叆鐗瑰畾鐨勫姛鑳界敾闈€
+ + +

+ + + + + TRADEdotNET + Highlights :
+
+ +  Easy Access + +
+
+

+ A Road Map showing the user-friendly system + flow guides users throughout all steps. User can click on the menu icons, + which act as shortcuts, and enter into the desired function.

+
+  瀹屽杽鐨勬煡璇㈡悳瀵诲櫒 + +
+
+
+
+ 褰撳憳宸ュ洖绛斿鎴锋煡璇㈡垨鍙戝嚭璁㈠崟锛岀粡甯搁渶鏃剁炕鏌ヤ互寰浜ゆ槗绾綍锛岃繖涓繃绋嬩笉浠呮氮璐规椂闂达紝涓囦竴鍥炵瓟涓嶅噯纭紝鏇村彲鑳戒护鎮ㄤ粠姝ゅけ鍘昏繖瀹濊吹鐨勫鎴枫傛煡璇㈡悳瀵诲櫒澶氱涓嶅悓鐨勫疄鏃舵煡璇㈠姛鑳斤紝鑳藉揩閫熸悳瀵绘墍闇鐨勬暟鎹邯褰曪紝鍙鐢ㄦ埛杈撳叆瀹㈡埛缂栧彿銆佽揣鍝佺紪鍙枫佸彂绁ㄦ棩鏈熺瓑鍏朵腑涓椤规悳瀵诲弬鏁帮紝鎼滃缁撴灉闅忓嵆鏄剧ず銆
+
+ +  Perfect On-line Enquiry + +
+
+
+
+ Under many circumstances, staff also need to + retrieve past transaction history for handing customer enquiry or placing + an order, however they cannot get the required information immediately and + this may drive away the customers. On-line Enquiry engine enables staff to + check past transaction with searching parameters such as key words, client + code, item code, invoice date. +
+  鏂囦欢杈撳叆 +
+
+ 绯荤粺鐨勬诲笎鎺ュ彛璁捐浠ュ父鐢ㄧ殑浼犵エ涓鸿摑鏈紝鐢ㄦ埛鏃犻渶璐规椂閲嶆柊閫傚簲涓嶅悓鏃ヨ甯愭牸寮忥紝鑰屼笖鑳芥洿鏈夋晥鐜囧湴澶勭悊鏃ュ父浼氳甯愰」鏁版嵁杈撳叆绋嬪簭銆
+ +  Input + Template +
+
+ The data entry journal interface is similar + to paper voucher, so that users can handle their daily accounting + transaction as they used to, yet more efficient.
+ +  鏃犻檺绾綍鍌ㄥ瓨  
+
+ 绯荤粺瀹归噺寮哄ぇ锛屼笉璁剧邯褰曞偍瀛樺勾鏈熶笂闄愶紝鍥犳鐢ㄦ埛鍙互闅忔椂鏌ラ槄浠讳綍鏃舵湡鐨勪氦鏄撶邯褰曘 +
+
+ + +  Unlimited + Data Record  
+
+ The system can store unlimited number of + records, so that users can retrieve data of any time whenever they need + it.
+  绯荤粺鐧诲叆鐩戞帶 +
+
+
+ 鍏堣繘鐨勭櫥鍏ョ洃鎺х郴缁熶繚闅(鏈哄瘑)鏁版嵁鍙緵鎺堟潈鐢ㄦ埛鏌ラ槄锛岀郴缁熺鐞嗗憳浜﹀彲浠ュ洜搴旂敤鎴风殑鑱岀骇鑰岃瀹氫釜鍒敤鎴风殑闃呰鏉冮檺銆
+ +  Login Control +
+
+
+ Advanced access control ensures access right + is only granted to authorized users. System administrator can also define + access level of each user according to their capacity, so that confidential + information can only be retrieved and viewed by senior management.
+  鑷夋姤琛ㄦ牸寮 +
+
+
+ 绯荤粺鎶ヨ〃浠ュ紑鏀惧紡璁捐锛屽彧闇瑕侀厤鍚圫eagate Crystal Report (鍙﹁喘)锛屽嵆鍙嚜琛岃璁℃姤琛ㄦ牸寮忔垨澧炲姞鎶ヨ〃銆
+ +  Customize Report +
+
+
+ The system is designed with an open architecture + format. When the system is used with  Seagate Crystal Report Software, Users can + customize report content and format of the system.
+ +  澶氬悜鍒梟鎶ヨ〃宸ュ叿
+
+
+
+ 瓒呰繃80%鐨勬姤琛ㄥ彲浠S Excel/Word鏍煎紡杈撳嚭锛屾寜闇瑕佽屽埗浣滃浘琛ㄤ緵鏁版嵁鍒嗘瀽涔嬬敤銆
+ 鎶ヨ〃鍙互MS Excel/Word绛夋牸寮忕嫭绔嬭緭鍑烘垨浠ョ數閭檮甯︿紶閫佺粰鏈夊叧浜哄憳銆
+ +  Multi-Report Export Tools
+
+
+
+ Over 80% of reports can be exported to MS + Excel /  Word and data can be translated into graphs and tables for + further analysis.
+ Reports can also be export to MS Excel / Word format independently or send + to email client with attachment directly.
+  鍥介檯浜掕仈鏀寔 +
+
+
+
+ 涓轰簡閰嶅悎涓嶅皯璐告槗鍏徃浜庡浗鍐呮垨涓滃崡浜氳鍘傛垨鍒嗗叕鍙歌岄渶瑕佹暟鎹暟鎹簰閫氾紝
TRADEdotNET + + 鎻愪緵鍏ㄩ潰瀹夊叏鐨勬暣鍚堝钩鍙帮紝瀹夎 TRADEdotNET 浜掕仈缃戞敮鎸侀檮浠讹紝閫忚繃浜掕仈缃戯紝鐢ㄦ埛鍗冲彲闅忔椂闅忓湴浠ュ畨瑁呬簡 + TRADEdotNET + + 鐨勬爣鍑 MS 鎿嶄綔绯荤粺鐧诲叆浣跨敤銆
+ +  Internet Ready +
+
+
+
+ To facilitate data exchange between trading companies and their offices in + the Mainland China or Southeast Asia Country,
+ + Install and makes use of TRADEdotNET + Internet Kit  to provide a secured platform enabling user + to access the data from different locations anytime through the internet + with TRADEdotNET + + system.
+  澶氱鏁版嵁搴撴敮鎸 +
+
+
+
+ 涓轰簡閰嶅悎涓嶅悓澶у皬鍏徃鐨勬湰韬渶瑕侊紝
TRADEdotNET 鎻愪緵涓嶅悓鏁版嵁搴撶増鏈互渚涢夋嫨銆傚凡鎺ㄥ嚭鏈 MS Access銆丮S SQL锛屽嵆灏嗘帹鍑烘湁 Oracle 鍙婂叾瀹冩暟鎹簱銆
+ 銆
+ +  Multi-Database Format +
+
+
+
+
TRADEdotNET + + enables user to select + different database format versions to fit their company requirements. Now + users can choose from MS + Access and MS SQL version.  Oracle and other database formats are coming soon.
+  鍏跺畠鏀寔鍔熻兘 +
+
+
+ 鏀寔澶氱敤鎴凤紝鏀寔澶氬叕鍙革紝鏀寔澶氳揣甯侊紝鏀寔澶氬簱瀛橈紝鏀寔澶氳瑷(涓枃/鑻辨枃) +
+ +  Multiple Functionality +
+
+
+ Support multi-users, multi-companies, + multi-currencies, multi-inventory, multi-languages (Chinese / English).
+ + +  绯荤粺瑕佹眰 + +
+

+ 宸ヤ綔鍙
+ Intel Pentium II (鎴栦互涓) Processor PC
+ Windows 98, ME, 2000 鎴 Windows NT 4.0
+ 鏈灏戠敤 64 MB RAM锛屾帹鑽愮敤128MB
+ 256鑹叉垨浠ヤ笂涔婼VGA鏄剧ず鍣
+ 50MB纭洏绌洪棿
+ Windows 98, ME, 2000 鎴 Windows NT 4.0 鏀寔涔嬫墦鍗版満
+ + + +  System + Requirements + + +
+

+ + Workstation
+ Intel Pentium II (or above) Processor PC
+ Windows 98, ME, 2000 or Windows NT 4.0
+ 64MB RAM + minimum锛 128MB + recommended
+ 256 color SVGA display or higher
+ 50MB free Hard Disk
+ Printers + supported by + Windows 98, ME, 2000 鎴 Windows NT 4.0
+ 銆
+ +  鏈嶅姟鑼冨洿 + +
+
+ 绯荤粺绀鸿寖
+      鍏嶈垂涓婇棬浣滅郴缁熺ず鑼 + 銆
+
+ 绯荤粺瀹夎
+      绯荤粺瀹夎浼氱敱鏈叕鍙镐笓涓氬伐绋嬪笀璐熻矗 + 銆
+
+ 鏁版嵁澶囦唤鍙婅繕鍘
+      鍏嶈垂涓哄鎴疯瀹氭暟鎹浠藉強杩樺師鎸夐挳锛屼互閰嶅悎瀹㈡埛涔嬧樺浠借澶団欍
+
+ 搴﹁韩璁㈠仛鏂囦欢寮忔牱
+      涓哄鎴峰害韬鍋氭枃浠跺紡鏍凤紝鎻愰珮鍏徃褰㈣薄(鍙﹁垂)銆
+
+ 绯荤粺鎵ц
+      涓哄悇鏈烘瀯璁惧畾绯荤粺娴佺▼琛ㄥ強鐩戝療鍚勯儴闂ㄧ殑鎵ц鎯呭喌 + 銆
+
+ 鐢ㄦ埛鍩硅
+      鐢ㄦ埛鍩硅鍙鍦ㄥ鎴峰姙鍏锛岃屼笖涓嶉檺娆℃暟 + 銆
+
+ 绯荤粺鍜ㄨ鐑嚎
+      鎻愪緵鏈夋晥鐩存帴鐨勭儹绾垮挩璇㈡湇鍔★紝澶勭悊绯荤粺鐤戦毦 + 銆
+
+ 绯荤粺淇濆吇
+      鍗婂勾鍏嶈垂淇濆吇 + 锛
+      浜庝繚鍏绘湡鍐呭厤璐逛负瀹㈡埛浣滅郴缁熸彁鍗 + 銆
+ +  Services + Provided + +
+
+ System Demonstration
+      Free-of-charge system demonstration in client's office
+
+ System Installation
+      + On-site + installation + by our + professional + engineers
+
+ Backup/Restore
+      Setups of backup and restore icons associated with client's backup device (e.g. Zip Drive, MO)
+
+ Tailored Format
+      Tailored designs on document formats to highlight and promote company image
+
+ System Implementation
+      + Implementation + procedures + customized for + each + organization
+
+ User Training
+      Unlimited training is provided in the client's office +
+
+ Hot-line Enquiry
+      Efficient hot-line support for all system enquiries
+
+ System Maintenance
+      Half-a-year free maintenance
+      Free + upgrade + services + throughout + warranty + periods
+
+
+ + + + +
+
+ 娆 杩 棰 绾 绀 鑼 璇风數 : (852) 2591 9377

绮 璁 鍥 闄 鏈 + 闄 鍏 鍙  Superdata International Ltd.
+ Tel: (852) 2591 9377

+

+ + + *All prices, + conditions and + system + specifications + are subject to + change without + prior notice. + 鎵鏈変环鏍硷紝鏉¤鍙婄郴缁熻鏍间箣淇敼锛屽皢涓嶅彟琛岄氱煡銆 + +銆

+ + diff --git a/camel/tests/mime-filter/charset-iso-2022-jp.0.in b/camel/tests/mime-filter/charset-iso-2022-jp.0.in new file mode 100644 index 0000000000..8c23b208ce --- /dev/null +++ b/camel/tests/mime-filter/charset-iso-2022-jp.0.in @@ -0,0 +1,5 @@ +$B$($m$$#t#y$&$H$&$#$&$$$(#y$F#r$A$&$(#r#y$H#y#r$H$($D$*#3#9#4#5#0#9#8#0#9#4$($$#r(B +$B$H$($D$*$($&$H$($k$H$&#t(B + +Thanks & Regards, +Sures diff --git a/camel/tests/mime-filter/charset-iso-2022-jp.0.out b/camel/tests/mime-filter/charset-iso-2022-jp.0.out new file mode 100644 index 0000000000..c66c5f79ce --- /dev/null +++ b/camel/tests/mime-filter/charset-iso-2022-jp.0.out @@ -0,0 +1,5 @@ +銇堛倣銇勶綌锝欍亞銇ㄣ亞銇冦亞銇勩亪锝欍仸锝掋仭銇嗐亪锝掞綑銇綑锝掋仺銇堛仱銇婏紦锛欙紨锛曪紣锛欙紭锛愶紮锛斻亪銇勶綊 +銇ㄣ亪銇ゃ亰銇堛亞銇ㄣ亪銈嬨仺銇嗭綌 + +Thanks & Regards, +Sures diff --git a/camel/tests/mime-filter/test-charset.c b/camel/tests/mime-filter/test-charset.c new file mode 100644 index 0000000000..301cf3b2b7 --- /dev/null +++ b/camel/tests/mime-filter/test-charset.c @@ -0,0 +1,140 @@ +/* + test-crlf.c + + Test the CamelMimeFilterCharset class +*/ + +#include +#include +#include +#include + +#include "camel-test.h" + +#include +#include +#include +#include + +#define d(x) x + +#define CHUNK_SIZE 4096 + +int +main (int argc, char **argv) +{ + ssize_t comp_progress, comp_correct_chunk, comp_filter_chunk; + char comp_correct[CHUNK_SIZE], comp_filter[CHUNK_SIZE]; + CamelStream *source; + CamelStream *correct; + CamelStreamFilter *filter; + CamelMimeFilter *f; + struct dirent *dent; + int i, test = 0; + DIR *dir; + + camel_test_init(argc, argv); + + dir = opendir (SOURCEDIR); + + while ((dent = readdir (dir))) { + char *outfile, *charset, *work; + const char *ext; + + ext = strrchr (dent->d_name, '.'); + if (!(!strncmp (dent->d_name, "charset-", 8) && ext && !strcmp (ext, ".in"))) + continue; + + work = g_strdup_printf ("Charset filter, test case %d (%s)", test++, dent->d_name); + camel_test_start (work); + g_free (work); + + if (!(source = camel_stream_fs_new_with_name (dent->d_name, 0, O_RDONLY))) { + camel_test_fail ("Failed to open input case in \"%s\"", dent->d_name); + continue; + } + + outfile = g_strdup_printf ("%.*s.out", ext - dent->d_name, dent->d_name); + + if (!(correct = camel_stream_fs_new_with_name (outfile, 0, O_RDONLY))) { + camel_test_fail ("Failed to open correct output in \"%s\"", outfile); + g_free (outfile); + continue; + } + g_free (outfile); + + if (!(filter = camel_stream_filter_new_with_stream (CAMEL_STREAM (source)))) { + camel_test_fail ("Couldn't create CamelStreamFilter??"); + continue; + } + + charset = g_strdup (dent->d_name + 8); + ext = strchr (charset, '.'); + *((char *) ext) = '\0'; + + if (!(f = (CamelMimeFilter *) camel_mime_filter_charset_new_convert (charset, "UTF-8"))) { + camel_test_fail ("Couldn't create CamelMimeFilterCharset??"); + g_free (charset); + continue; + } + g_free (charset); + + camel_stream_filter_add (filter, f); + camel_object_unref (f); + + camel_test_push ("Running filter and comparing to correct result"); + + comp_progress = 0; + + while (1) { + comp_correct_chunk = camel_stream_read (correct, comp_correct, CHUNK_SIZE); + comp_filter_chunk = 0; + + if (comp_correct_chunk == 0) + break; + + while (comp_filter_chunk < comp_correct_chunk) { + ssize_t delta; + + delta = camel_stream_read (CAMEL_STREAM (filter), + comp_filter + comp_filter_chunk, + CHUNK_SIZE - comp_filter_chunk); + + if (delta == 0) { + camel_test_fail ("Chunks are different sizes: correct is %d, " + "filter is %d, %d bytes into stream", + comp_correct_chunk, comp_filter_chunk, comp_progress); + } + + comp_filter_chunk += delta; + } + + for (i = 0; i < comp_filter_chunk; i++) { + if (comp_correct[i] != comp_filter[i]) { + camel_test_fail ("Difference: correct is %c, filter is %c, " + "%d bytes into stream", + comp_correct[i], + comp_filter[i], + comp_progress + i); + } + } + + comp_progress += comp_filter_chunk; + } + + camel_test_pull (); + + /* inefficient */ + camel_test_push ("Cleaning up"); + camel_object_unref (CAMEL_OBJECT (filter)); + camel_object_unref (CAMEL_OBJECT (correct)); + camel_object_unref (CAMEL_OBJECT (source)); + camel_test_pull (); + + camel_test_end (); + } + + closedir (dir); + + return 0; +} diff --git a/camel/tests/mime-filter/test-crlf.c b/camel/tests/mime-filter/test-crlf.c index 0ffa5b2b26..bbf443be09 100644 --- a/camel/tests/mime-filter/test-crlf.c +++ b/camel/tests/mime-filter/test-crlf.c @@ -17,7 +17,7 @@ #define d(x) x #define NUM_CASES 1 -#define CHUNK_SIZE 32 +#define CHUNK_SIZE 4096 enum { CRLF_ENCODE, @@ -49,7 +49,7 @@ main (int argc, char **argv) for (j = CRLF_ENCODE; j < CRLF_DONE; j++) { CamelMimeFilterCRLFDirection direction; - char *infile, *outfile; + char *infile = NULL, *outfile = NULL; switch (j) { case CRLF_ENCODE: @@ -127,9 +127,6 @@ main (int argc, char **argv) comp_filter_chunk += delta; } - d(printf ("\n\nCORRECT: >>%.*s<<", comp_correct_chunk, comp_correct)); - d(printf ("\nFILTER : >>%.*s<<\n", comp_filter_chunk, comp_filter)); - for (comp_i = 0; comp_i < comp_filter_chunk; comp_i++) { if (comp_correct[comp_i] != comp_filter[comp_i]) { camel_test_fail ("Difference: correct is %c, filter is %c, " -- cgit v1.2.3