Added missing files from OC changes

This commit is contained in:
Ludovic Marcotte
2016-06-23 09:05:44 -04:00
parent bd75eaf878
commit e02b975bb5
14 changed files with 827 additions and 0 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,21 @@
{\rtf1\ansi\deff3\adeflang1025
{\fonttbl{\f0\froman\fprq2\fcharset0 Times New Roman;}{\f1\froman\fprq2\fcharset2 Symbol;}{\f2\fswiss\fprq2\fcharset0 Arial;}{\f3\froman\fprq2\fcharset0 Times New Roman;}{\f4\fs
wiss\fprq2\fcharset0 Arial;}{\f5\fnil\fprq2\fcharset1 Ubuntu;}{\f6\fnil\fprq2\fcharset0 DejaVu Sans;}{\f7\fnil\fprq2\fcharset0 Lohit Hindi;}{\f8\fnil\fprq0\fcharset1 Lohit Hindi
;}}
{\colortbl;\red0\green0\blue0;\red128\green128\blue128;}
{\stylesheet{\s0\snext0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af6\langfe2052\dbch\af7\afs24\alang1081\loch\f3\fs24\lang1033 Normal;}
{\s15\sbasedon0\snext16\sb240\sa120\keepn\dbch\af6\dbch\af7\afs28\loch\f4\fs28 Heading;}
{\s16\sbasedon0\snext16\sb0\sa120 Text Body;}
{\s17\sbasedon16\snext17\sb0\sa120\dbch\af8 List;}
{\s18\sbasedon0\snext18\sb120\sa120\noline\i\dbch\af8\afs24\ai\fs24 Caption;}
{\s19\sbasedon0\snext19\noline\dbch\af8 Index;}
}{\info{\creatim\yr2014\mo8\dy4\hr16\min16}{\revtim\yr0\mo0\dy0\hr0\min0}{\printim\yr0\mo0\dy0\hr0\min0}{\comment LibreOffice}{\vern67175170}}\deftab709
\viewscale100
{\*\pgdsctbl
{\pgdsc0\pgdscuse451\pgwsxn11906\pghsxn16838\marglsxn1134\margrsxn1134\margtsxn1134\margbsxn1134\pgdscnxt0 Default Style;}}
\formshade\paperh16838\paperw11906\margl1134\margr1134\margt1134\margb1134\sectd\sbknone\sectunlocked1\pgndec\pgwsxn11906\pghsxn16838\marglsxn1134\margrsxn1134\margtsxn1134\marg
bsxn1134\ftnbj\ftnstart1\ftnrstcont\ftnnar\aenddoc\aftnrstcont\aftnstart1\aftnnrlc
\pgndec\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af6\langfe2052\dbch\af7\afs24\alang1081\loch\f3\fs24\lang1033{\rtlch \ltrch\loch\l
och\f5000
foobar}
\par }
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+101
View File
@@ -0,0 +1,101 @@
/* TestNGMimeAddressHeaderFieldGenerator.m - this file is part of SOGo
*
* Copyright (C) 2016
*
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#import <NGMime/NGMimeType.h>
#import <NGExtensions/NSString+Encoding.h>
#import "SOGoTest.h"
#include <stdio.h>
@interface TestNGMimeType : SOGoTest
@end
@implementation TestNGMimeType
- (void) test_EncodingForCharset
{
int i;
NSArray *cases = [NSArray arrayWithObjects:
@"utf8",
[NSNumber numberWithInt: NSUTF8StringEncoding],
[NSNumber numberWithInt: NSUTF8StringEncoding],
@"utf-8",
[NSNumber numberWithInt: NSUTF8StringEncoding],
[NSNumber numberWithInt: NSUTF8StringEncoding],
@"ascii",
[NSNumber numberWithInt: NSASCIIStringEncoding],
[NSNumber numberWithInt: NSASCIIStringEncoding],
@"us-ascii",
[NSNumber numberWithInt: NSASCIIStringEncoding],
[NSNumber numberWithInt: NSASCIIStringEncoding],
@"iso-8859-5",
[NSNumber numberWithInt: NSISOCyrillicStringEncoding],
[NSNumber numberWithInt: NSISOCyrillicStringEncoding],
@"windows-1251",
[NSNumber numberWithInt: NSWindowsCP1251StringEncoding],
[NSNumber numberWithInt: NSWindowsCP1251StringEncoding],
@"inexistent_encoding",
[NSNumber numberWithInt: NSISOLatin1StringEncoding],
[NSNumber numberWithInt: 0],
@"nil",
[NSNumber numberWithInt: [NSString defaultCStringEncoding]],
[NSNumber numberWithInt: 0],
@"",
[NSNumber numberWithInt: [NSString defaultCStringEncoding]],
[NSNumber numberWithInt: 0],
nil];
for (i=0; i < [cases count]; i+=3)
{
NSStringEncoding fromNGMimeType, fromNSString;
NSString *charset = [cases objectAtIndex: i];
NSStringEncoding fromNGMimeTypeExpected = [[cases objectAtIndex: i+1] intValue];
NSStringEncoding fromNSStringExpected = [[cases objectAtIndex: i+2] intValue];
NSString *error;
if ([charset isEqualToString: @"nil"])
charset = nil;
fromNGMimeType = [NGMimeType stringEncodingForCharset: charset];
error = [NSString
stringWithFormat:
@"[NGMimeType stringEncodingForCharset: %@]=%i expected: %i",
charset, fromNGMimeType, fromNGMimeTypeExpected];
testWithMessage(fromNGMimeType == fromNGMimeTypeExpected, error);
fromNSString = [NSString stringEncodingForEncodingNamed: charset];
error = [NSString
stringWithFormat:
@"[NSString stringEncodingForEncodingNamed: %@]=%i expected: %i",
charset, fromNSString, fromNSStringExpected];
testWithMessage(fromNSString == fromNSStringExpected, error);
}
}
@end