encode2047.at 1.8 KB
# This file is part of GNU Mailutils. -*- Autotest -*-
# Copyright (C) 2007-2012, 2014-2017 Free Software Foundation, Inc.
#
# GNU Mailutils 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, or (at
# your option) any later version.
#
# GNU Mailutils 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 GNU Mailutils.  If not, see <http://www.gnu.org/licenses/>.

dnl ------------------------------------------------------------
dnl TESTENC2047([NAME], [KW = `'], [OPT], [INPUT], [STDOUT = `'])
dnl
m4_pushdef([TESTENC2047],[
m4_pushdef([MU_TEST_GROUP],[Encode 2047])
m4_pushdef([MU_TEST_KEYWORDS],[encode2047 encode])
m4_pushdef([MU_TEST_COMMAND],[encode2047 -eB $3])
MU_GENERIC_TEST([$1],[$2],[$4],[],[$5
])
m4_popdef([MU_TEST_COMMAND])
m4_popdef([MU_TEST_KEYWORDS])
m4_popdef([MU_TEST_GROUP])
])

TESTENC2047([8-bit input],[enc01],
            [-c koi8-r -o],
            [\\345\326\305\304\316\305\327\316\331\312\040\317\324\336\305\324],
            [=?koi8-r?B?5dbFxM7F187ZyiDP1N7F1A==?=])

TESTENC2047([padding 1],[enc02],
            [],
            [abcd],
	    [=?iso-8859-1?B?YWJjZA==?=])
	    
TESTENC2047([padding 2],[enc03],
            [],
            [abcdef],
	    [=?iso-8859-1?B?YWJjZGVm?=])

TESTENC2047([padding 3],[enc04],
            [-cUTF-8],
	    [Wichtige Mitteilung zur Schaltung Ihres Anschlusses],
	    [=?UTF-8?B?V2ljaHRpZ2UgTWl0dGVpbHVuZyB6dXIgU2NoYWx0dW5nIElocmVzIEFuc2NobHVzc2Vz?=])
	    
	    
m4_popdef([TESTENC2047])