aboutsummaryrefslogtreecommitdiffstats
path: root/script/wraptest
diff options
context:
space:
mode:
authorfrancis <francis>2007-12-12 23:35:09 +0000
committerfrancis <francis>2007-12-12 23:35:09 +0000
commit07751d94086bc9330bbe0728c8d022362c9c8571 (patch)
tree56420f703762a83ab3aaecc95cd22d8f569c9bbc /script/wraptest
parent6ada66a26ba65866f9c88dc040fb5271ac5110ee (diff)
Word wrap emails.
Fix user id references in test code.
Diffstat (limited to 'script/wraptest')
-rwxr-xr-xscript/wraptest41
1 files changed, 41 insertions, 0 deletions
diff --git a/script/wraptest b/script/wraptest
new file mode 100755
index 000000000..d15d255b3
--- /dev/null
+++ b/script/wraptest
@@ -0,0 +1,41 @@
+#!/usr/bin/ruby
+#
+# wraptest:
+# Test email wrapping function
+#
+# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
+# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
+#
+
+$:.push(File.join(File.dirname(__FILE__), '../../rblib'))
+load "format.rb"
+
+test_email = '''Dear Sir or Madam,
+
+Again and again I extend this sentence and yet again I extend this sentence and yet again I extend this sentence and yet again I extend this sentence and yet again I extend this sentence and yet again I extend this sentence and yet again I extend this sentence and yet again I extend this sentence and yet again I extend this sentence and yet again I extend this sentence and yet again I extend this sentence and yet again I extend this sentence and yet again I extend this sentence and yet again I extend this sentence and yet again I extend this sentence and yet again I extend this sentence and yet again I extend this sentence and yet again I extend this sentence and yet
+
+Hey you.
+
+Yours faithfully,
+
+Boo!
+
+--
+
+Sent using GovernmentSpy, a project of UKCOD, registered charity number
+1076346. Is frabcus@fastmail.fm the wrong
+address for Freedom of Information requests to The Geraldine Quango? If so please let us know by emailing
+team@governmentspy quoting reference PB2.
+We\'ll make sure future ones go to the right place.
+'''
+
+puts MySociety::Format.wrap_email_body(test_email)
+
+#puts MySociety::Format.wrap_email_body("Hello this is a string.
+#
+#And another.
+#And a third.")
+
+
+
+