# HG changeset patch # User Paul Boddie # Date 1388688186 -3600 # Node ID 391612e9248b8211fa9e6050f8eb38c4ddae85b8 # Parent 8207a0b67eeaf613fa4702bc006957565731ad05 Added a test program to wrap messages for signing. diff -r 8207a0b67eea -r 391612e9248b README.txt --- a/README.txt Sat Dec 28 19:25:28 2013 +0100 +++ b/README.txt Thu Jan 02 19:43:06 2014 +0100 @@ -342,6 +342,7 @@ python tests/test_message.py collection update 'An update to the wiki.' \ 'Another update.' \ +| python tests/test_message_wrap.py \ > test.txt \ && cat test.txt \ | gpg --armor -u 1C1AAF83 --detach-sig \ diff -r 8207a0b67eea -r 391612e9248b tests/test_message_wrap.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test_message_wrap.py Thu Jan 02 19:43:06 2014 +0100 @@ -0,0 +1,19 @@ +#!/usr/bin/env python + +from email.mime.application import MIMEApplication +import sys + +if __name__ == "__main__": + text = sys.stdin.read() + + # Make a representation-insensitive container for the message. + + content = MIMEApplication(text) + + # Show the resulting message text. + + text = content.as_string() + + print text + +# vim: tabstop=4 expandtab shiftwidth=4