Annotation of embedaddon/php/ext/mbstring/tests/mb_send_mail05.phpt, revision 1.1.1.3

1.1       misho       1: --TEST--
                      2: mb_send_mail() test 5 (lang=Simplified Chinese)
                      3: --SKIPIF--
                      4: <?php
1.1.1.3 ! misho       5: if (substr(PHP_OS, 0, 3) == 'WIN') {
        !             6:        die('skip.. Not valid for Windows');
1.1.1.2   misho       7: }
1.1       misho       8: if (!function_exists("mb_send_mail") || !mb_language("Simplified Chinese")) {
                      9:        die("skip mb_send_mail() not available");
                     10: }
                     11: if (!@mb_internal_encoding('GB2312')) {
                     12:        die("skip GB2312 encoding is not available on this platform");
                     13: }
                     14: ?>
                     15: --INI--
                     16: sendmail_path=/bin/cat
                     17: mail.add_x_header=off
                     18: --FILE--
                     19: <?php
                     20: $to = 'example@example.com';
                     21: 
                     22: /* default setting */
                     23: mb_send_mail($to, mb_language(), "test");
                     24: 
                     25: /* Simplified Chinese (HK-GB-2312) */
                     26: if (mb_language("simplified chinese")) {
                     27:        mb_internal_encoding('GB2312');
                     28:        mb_send_mail($to, "²βΡι ".mb_language(), "²βΡι");
                     29: }
                     30: ?>
                     31: --EXPECTF--
                     32: To: example@example.com
                     33: Subject: %s
                     34: MIME-Version: 1.0
                     35: Content-Type: text/plain; charset=%s
                     36: Content-Transfer-Encoding: %s
                     37: 
                     38: %s
                     39: To: example@example.com
                     40: Subject: =?HZ-GB-2312?B?fnsyYlFpfn0gU2ltcGxpZmllZCBD?=
                     41:  =?HZ-GB-2312?B?aGluZXNl?=
                     42: MIME-Version: 1.0
                     43: Content-Type: text/plain; charset=HZ-GB-2312
                     44: Content-Transfer-Encoding: 7bit
                     45: 
                     46: ~{2bQi~}

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>