mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 00:02:28 +00:00
Fixed issue with non xml-compliant character encodings. Added tests.
This commit is contained in:
33
MacPassTests/KPKTextXMLUtilities.m
Normal file
33
MacPassTests/KPKTextXMLUtilities.m
Normal file
@@ -0,0 +1,33 @@
|
||||
//
|
||||
// KPKTextXMLUtilities.m
|
||||
// MacPass
|
||||
//
|
||||
// Created by Michael Starke on 12/12/14.
|
||||
// Copyright (c) 2014 HicknHack Software GmbH. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import <XCTest/XCTest.h>
|
||||
|
||||
#import "KPKXmlUtilities.h"
|
||||
|
||||
@interface KPKTextXMLUtilities : XCTestCase
|
||||
|
||||
@end
|
||||
|
||||
@implementation KPKTextXMLUtilities
|
||||
|
||||
- (void)setUp {
|
||||
[super setUp];
|
||||
}
|
||||
|
||||
- (void)tearDown {
|
||||
[super tearDown];
|
||||
}
|
||||
|
||||
- (void)testExample {
|
||||
NSString *safe = stripUnsafeCharacterForXMLFromString(@"*EORDIE\x10\x16\x12\x10");
|
||||
XCTAssertEqualObjects(@"*EORDIE", safe);
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user