diff options
Diffstat (limited to 'tests/charset')
-rw-r--r-- | tests/charset/Makefile | 5 | ||||
-rw-r--r-- | tests/charset/main.cpp | 44 | ||||
-rwxr-xr-x | tests/charset/run-test.sh | 47 | ||||
-rw-r--r-- | tests/charset/test-suites/gnu.in.utf-8 | 48 | ||||
-rw-r--r-- | tests/charset/test-suites/gnu.out.iso-8859-1 | 48 |
5 files changed, 0 insertions, 192 deletions
diff --git a/tests/charset/Makefile b/tests/charset/Makefile deleted file mode 100644 index e46fafa5..00000000 --- a/tests/charset/Makefile +++ /dev/null @@ -1,5 +0,0 @@ - - -main: main.cpp ../../libvmime-debug.a - g++ -g -o main main.cpp -I../.. ../../libvmime-debug.a -lgnutls -lgsasl - diff --git a/tests/charset/main.cpp b/tests/charset/main.cpp deleted file mode 100644 index d8523461..00000000 --- a/tests/charset/main.cpp +++ /dev/null @@ -1,44 +0,0 @@ -// -// VMime library (http://www.vmime.org) -// Copyright (C) 2002-2013 Vincent Richard <[email protected]> -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License as -// published by the Free Software Foundation; either version 3 of -// the License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License along -// with this program; if not, write to the Free Software Foundation, Inc., -// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -// -// Linking this library statically or dynamically with other modules is making -// a combined work based on this library. Thus, the terms and conditions of -// the GNU General Public License cover the whole combination. -// - -#include <iostream> -#include <ostream> - -#include "vmime/vmime.hpp" -#include "vmime/platforms/posix/posixHandler.hpp" - - -int main(int argc, char* argv[]) -{ - // VMime initialization - vmime::platform::setHandler<vmime::platforms::posix::posixHandler>(); - - - const vmime::string from(argv[1]); - const vmime::string to(argv[2]); - - vmime::utility::inputStreamAdapter in(std::cin); - vmime::utility::outputStreamAdapter out(std::cout); - - vmime::charset::convert(in, out, from, to); -} diff --git a/tests/charset/run-test.sh b/tests/charset/run-test.sh deleted file mode 100755 index 95846c06..00000000 --- a/tests/charset/run-test.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh - -TEST_DIR="./test-suites" -TEMP_DIR="/tmp" -PROGRAM="./main" - - -testFiles=`cd $TEST_DIR ; find . -maxdepth 1 -regex '\./[^\.]*\.in\..*' -type f` - -echo -echo Testing charset conversions -echo ===================================================================== - -for testFile in $testFiles ; do - - testName=`echo $testFile | sed 's/^\.\/\([^\.]*\).*/\1/'` - sourceCharset=`echo $testFile | sed 's/^\.\/[^\.]*\.[^\.]*\.\(.*\)/\1/'` - - testOutFiles=`cd $TEST_DIR ; find . -maxdepth 1 -regex "\./$testName\.out\..*" -type f` - - for testOutFile in $testOutFiles ; do - - destCharset=`echo $testOutFile | sed 's/^\.\/[^\.]*\.[^\.]*\.\(.*\)/\1/'` - - printf %20s "$testName " - printf %30s "$sourceCharset --> $destCharset : " - - $PROGRAM $sourceCharset $destCharset < $TEST_DIR/$testFile > $TEMP_DIR/vmime_result - - diff="diff $TEMP_DIR/vmime_result $TEST_DIR/$testOutFile" - res=`$diff` - - if [ "$res" = "" ] - then - echo "[OK]" - else - diffFile=$TEMP_DIR/vmime.charset.$testName.$sourceCharset.$destCharset.diff - echo "[NO: diff file is $diffFile]" - $diff > $diffFile - fi - - done - -done - -echo - diff --git a/tests/charset/test-suites/gnu.in.utf-8 b/tests/charset/test-suites/gnu.in.utf-8 deleted file mode 100644 index 782bb84e..00000000 --- a/tests/charset/test-suites/gnu.in.utf-8 +++ /dev/null @@ -1,48 +0,0 @@ -Korean Part. -GNU 프로젝트의 웹서버인 www.gnu.org에 오신 것을 환영합니다. GNU 프로젝트는 -GNU 시스템이라고 불리는 유닉스 형태의 완벽한 자유 소프트웨어 운영체제를 -개발하기 위해서 1984년부터 시작되었습니다. (GNU라는 단어는 ``GNU's Not -Unix''를 의미하는 재귀적 약어이며 ``그-뉴"라고 발음합니다.) GNU -시스템으로부터 연유한 다양한 종류의 운영체제들이 현재 ``리눅스''라는 -이름으로 사용되고 있지만, 시스템 커널로 리눅스를 탑재한 운영체제의 보다 -정확한 이름은 GNU/리눅스 시스템입니다. - -Japanese Part - -GNU プロジェクトのウェブサーバ、www.gnu.org へようこそ。1984 年のプロジェクト -開始以来、GNU プロジェクトでは、Unix に似た フリーソフトウェアの完全なオペレー -ティングシステム、GNU システムを開発して来ました(GNU とは「GNU's Not Unix(GNU -は Unix ではない)」の再帰頭字語であり、「グニュー」と発音されます)。現在、カーネ -ルとして Linux を用いた GNU システムのさまざまな変種が広く使われています。これ -らのシステムは「Linux」と呼ばれることが多いのですが、より正確には GNU/Linux -システム と呼ばれるものなのです。 - -Chinese Part. - -歡迎來到GNU 專案的伺服主機,www.gnu.org。 GNU 專案 開始於1984年,旨在發展一 -個 Unix-like 且為 自由軟體 的作業系統: GNU 系統。(GNU 是由``GNU's Not -Unix''所遞迴定義出的頭字語);它的發音為"guh-NEW"。各種使用 Linux 作為核心的 GNU -作業系統正被廣泛的使用著;雖然這些系統通常被稱作 ``Linux'',但是它們應該更精 -確地被稱為 GNU/Linux 系統。 - -English Part. - -Welcome to the GNU Project web server, www.gnu.org. The GNU Project was -launched in 1984 to develop a complete Unix-like operating system which is -free software: the GNU system. (GNU is a recursive acronym for ``GNU's Not -Unix''; it is pronounced "guh-NEW".) Variants of the GNU operating system, -which use the kernel Linux, are now widely used; though these systems are -often referred to as ``Linux'', they are more accurately called GNU/Linux -systems. - -French Part. -Bienvenue sur le serveur web du projet GNU, www.gnu.org. Le projet GNU a été -lancé en 1984 afin de développer un système d'exploitation complet, -semblable à Unix et qui soit un logiciel libre: le système GNU. (« GNU » -est l'acronyme récursif the « GNU's Not Unix »; on le prononce « gnou » -avec un G audible) Des variantes du système d'exploitation GNU, basées sur -le noyau « Linux », sont utilisées largement à présent; bien que ces -systèmes soient communément appelés par le terme « Linux », ils le -seraient plus exactement par « GNU/Linux ». - - diff --git a/tests/charset/test-suites/gnu.out.iso-8859-1 b/tests/charset/test-suites/gnu.out.iso-8859-1 deleted file mode 100644 index bc11399e..00000000 --- a/tests/charset/test-suites/gnu.out.iso-8859-1 +++ /dev/null @@ -1,48 +0,0 @@ -Korean Part. -GNU ??????????????? ???????????? www.gnu.org??? ?????? ?????? ???????????????. GNU ??????????????? -GNU ?????????????????? ????????? ????????? ????????? ????????? ?????? ??????????????? ??????????????? -???????????? ????????? 1984????????? ?????????????????????. (GNU?????? ????????? ``GNU's Not -Unix''??? ???????????? ????????? ???????????? ``???-???"?????? ???????????????.) GNU -????????????????????? ????????? ????????? ????????? ?????????????????? ?????? ``?????????''?????? -???????????? ???????????? ?????????, ????????? ????????? ???????????? ????????? ??????????????? ?????? -????????? ????????? GNU/????????? ??????????????????. - -Japanese Part - -GNU ??????????????????????????????????????????www.gnu.org ??????????????????1984 ???????????????????????? -???????????????GNU ???????????????????????????Unix ????????? ??????????????????????????????????????????????????? -???????????????????????????GNU ???????????????????????????????????????(GNU ?????????GNU's Not Unix(GNU -??? Unix ????????????)????????????????????????????????????????????????????????????????????????)????????????????????? -???????????? Linux ???????????? GNU ??????????????????????????????????????????????????????????????????????????? -????????????????????????Linux?????????????????????????????????????????????????????????????????? GNU/Linux -???????????? ???????????????????????????????????? - -Chinese Part. - -????????????GNU ????????????????????????www.gnu.org??? GNU ?????? ?????????1984????????????????????? -??? Unix-like ?????? ???????????? ?????????????????? GNU ????????????GNU ??????``GNU's Not -Unix''???????????????????????????????????????????????????"guh-NEW"??????????????? Linux ??????????????? GNU -???????????????????????????????????????????????????????????????????????? ``Linux''??????????????????????????? -??????????????? GNU/Linux ????????? - -English Part. - -Welcome to the GNU Project web server, www.gnu.org. The GNU Project was -launched in 1984 to develop a complete Unix-like operating system which is -free software: the GNU system. (GNU is a recursive acronym for ``GNU's Not -Unix''; it is pronounced "guh-NEW".) Variants of the GNU operating system, -which use the kernel Linux, are now widely used; though these systems are -often referred to as ``Linux'', they are more accurately called GNU/Linux -systems. - -French Part. -Bienvenue sur le serveur web du projet GNU, www.gnu.org. Le projet GNU a �t� -lanc� en 1984 afin de d�velopper un syst�me d'exploitation complet, -semblable � Unix et qui soit un logiciel libre: le syst�me GNU. (� GNU � -est l'acronyme r�cursif the � GNU's Not Unix �; on le prononce � gnou � -avec un G audible) Des variantes du syst�me d'exploitation GNU, bas�es sur -le noyau � Linux �, sont utilis�es largement � pr�sent; bien que ces -syst�mes soient commun�ment appel�s par le terme � Linux �, ils le -seraient plus exactement par � GNU/Linux �. - - |