blob: 780c9b4a2d3e20f6f4b3c8873330b97ebabece52 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
#!/usr/bin/env 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.
'''
test_email.gsub!(/\n/, "\r\n")
puts MySociety::Format.wrap_email_body(test_email)
#puts MySociety::Format.wrap_email_body("Hello this is a string.
#
#And another.
#And a third.")
|