use CRLF as newline characters
This commit is contained in:
parent
46161efce6
commit
dea3678fbe
2 changed files with 3 additions and 3 deletions
|
@ -57,7 +57,7 @@ class AutocryptHeader {
|
|||
int autocryptHeaderLength = autocryptHeaderString.length();
|
||||
for (int i = 0; i < autocryptHeaderLength; i += HEADER_LINE_LENGTH) {
|
||||
if (i + HEADER_LINE_LENGTH <= autocryptHeaderLength) {
|
||||
headerLines.append(autocryptHeaderString, i, i + HEADER_LINE_LENGTH).append("\n ");
|
||||
headerLines.append(autocryptHeaderString, i, i + HEADER_LINE_LENGTH).append("\r\n ");
|
||||
} else {
|
||||
headerLines.append(autocryptHeaderString, i, autocryptHeaderLength);
|
||||
}
|
||||
|
|
|
@ -31,8 +31,8 @@ public class AutocryptHeaderTest {
|
|||
public void toRawHeaderString_returnsExpected() throws Exception {
|
||||
String autocryptHeaderString = autocryptHeader.toRawHeaderString();
|
||||
|
||||
String expected = "Autocrypt: addr=addr;prefer-encrypt=mutual;keydata=dGhlc2VhcmUxMjBjaGFyYWN0Z\n" +
|
||||
" XJzeHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4e\n" +
|
||||
String expected = "Autocrypt: addr=addr;prefer-encrypt=mutual;keydata=dGhlc2VhcmUxMjBjaGFyYWN0Z\r\n" +
|
||||
" XJzeHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4e\r\n" +
|
||||
" Hh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4";
|
||||
assertEquals(expected, autocryptHeaderString);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue