Annotation of embedaddon/php/ext/imap/tests/bug32589.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--                                 
                      2: Bug #32589 (crash inside imap_mail_compose() function)
                      3: --SKIPIF--
                      4: <?php
                      5:         if (!extension_loaded("imap")) { 
                      6:                 die("skip imap extension not available");  
                      7:         }
                      8: ?>
                      9: --FILE--
                     10: <?php
                     11: $m_envelope["To"] = "mail@example.com";
                     12: $m_part1["type"] = TYPEMULTIPART;
                     13: $m_part1["subtype"] = "mixed";
                     14: $m_part2["type"] = TYPETEXT;
                     15: $m_part2["subtype"] = "plain";
                     16: $m_part2["description"] = "text_message";
                     17: 
                     18: $m_part2["charset"] = "ISO-8859-2";
                     19: 
                     20: $m_part2["contents.data"] = "hello";
                     21: $m_body[1] = $m_part1;
                     22: $m_body[2] = $m_part2;
                     23: echo imap_mail_compose($m_envelope, $m_body);
                     24: ?>
                     25: --EXPECTF--
                     26: MIME-Version: 1.0
                     27: Content-Type: MULTIPART/mixed; BOUNDARY="%s"
                     28: 
                     29: %s
                     30: Content-Type: TEXT/plain; CHARSET=ISO-8859-2
                     31: Content-Description: text_message
                     32: 
                     33: hello
                     34: %s

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