summaryrefslogtreecommitdiff
path: root/test/build_postTest.php
diff options
context:
space:
mode:
authorJoel Uckelman <uckelman@nomic.net>2012-03-18 01:59:16 +0100
committerJoel Uckelman <uckelman@nomic.net>2012-03-18 01:59:16 +0100
commitd365166dc05f1562503eb68900c227e6a64c964f (patch)
tree290c08987ce3d246792aa18ff0a52f26737b4a11 /test/build_postTest.php
parent1aaeb20c92cc3650b891ee4bf674eccf402fcd3b (diff)
Moved list footer stripping to strip_list_footer().
Diffstat (limited to 'test/build_postTest.php')
-rw-r--r--test/build_postTest.php35
1 files changed, 35 insertions, 0 deletions
diff --git a/test/build_postTest.php b/test/build_postTest.php
index 5e8017e..3dc2cb5 100644
--- a/test/build_postTest.php
+++ b/test/build_postTest.php
@@ -60,6 +60,41 @@ class build_post_test extends PHPUnit_Framework_TestCase {
array('[l]', '[f]', 'Edit: Re: Subject [l][f] Subject', true, 'Re: Subject Subject')
);
}
+
+ function test_strip_list_footer() {
+ $exp = "Thus spake uckelman:
+> The changes appear to have munged SELinux permissions for the list
+> bridge. Trying again...
+>
+
+And checking that the bridge works in the other direction...
+
+--
+J.
+";
+
+ $fpat = "/^_______________________________________________\nmessages mailing list\nmessages@vassalengine.org\nhttp:\/\/www.vassalengine.org\/mailman\/listinfo\/messages.*/ms";
+
+ $this->assertEquals($exp, strip_list_footer("Thus spake uckelman:
+> The changes appear to have munged SELinux permissions for the list
+> bridge. Trying again...
+>
+
+And checking that the bridge works in the other direction...
+
+--
+J.
+_______________________________________________
+messages mailing list
+messages@vassalengine.org
+http://www.vassalengine.org/mailman/listinfo/messages
+", $fpat));
+
+ $msg = new MailmanMessage(file_get_contents(__DIR__ . '/326'));
+ list($text, ) = $msg->getFlattenedParts();
+
+ $this->assertEquals($exp, strip_list_footer($text, $fpat));
+ }
}
?>