File: 0009-fix-testaddress-for-ruby2.0.patch

package info (click to toggle)
ruby-rubymail 1.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,188 kB
  • ctags: 1,109
  • sloc: ruby: 6,061; makefile: 7
file content (21 lines) | stat: -rw-r--r-- 932 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--- a/test/testaddress.rb
+++ b/test/testaddress.rb
@@ -797,14 +797,14 @@ class TestRMailAddress < TestBase
   def test_invalid_addresses()
     # The display name isn't encoded -- bad, but we parse it.
     validate_case\
-    ["\322\315\322 \312\353\363\341 <bar@foo.invalid>",
-      [ { :name => "\322\315\322 \312\353\363\341",
-	  :display_name => "\322\315\322 \312\353\363\341",
+    ["\322\315\322 \312\353\363\341 <bar@foo.invalid>".force_encoding('ASCII-8BIT'),
+      [ { :name => "\322\315\322 \312\353\363\341".force_encoding("ASCII-8BIT"),
+	  :display_name => "\322\315\322 \312\353\363\341".force_encoding("ASCII-8BIT"),
 	  :address => 'bar@foo.invalid',
 	  :comments => nil,
 	  :domain => 'foo.invalid',
 	  :local => 'bar',
-	  :format => "\"\322\315\322 \312\353\363\341\" <bar@foo.invalid>",
+	  :format => "\"\322\315\322 \312\353\363\341\" <bar@foo.invalid>".force_encoding("ASCII-8BIT"),
 	} ] ]
   end