mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 03:32:40 +00:00
Fixed issue resutling in singel hotkey combination not being properly processed
This commit is contained in:
@@ -238,5 +238,21 @@
|
||||
keyPress = commands[4];
|
||||
XCTAssertEqual(keyPress.keyCode, kVK_Return);
|
||||
XCTAssertEqual(keyPress.modifierMask, 0);
|
||||
|
||||
|
||||
/* Command 3 */
|
||||
context = [[MPAutotypeContext alloc] initWithEntry:self.entry andSequence:@"^T"];
|
||||
commands = [MPAutotypeCommand commandsForContext:context];
|
||||
XCTAssertTrue(commands.count == 1);
|
||||
XCTAssertTrue([commands[0] isKindOfClass:[MPAutotypeKeyPress class]]);
|
||||
|
||||
/*^T*/
|
||||
keyPress = commands[0];
|
||||
XCTAssertEqualObjects(@"t", [MPKeyMapper stringForKey:keyPress.keyCode]);
|
||||
/* TODO - Respect user settings? */
|
||||
XCTAssertEqual(keyPress.modifierMask, kCGEventFlagMaskCommand);
|
||||
/*XCTAssertEqual(keyPress.modifierMask, kCGEventFlagMaskControl);*/
|
||||
|
||||
|
||||
}
|
||||
@end
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import <XCTest/XCTest.h>
|
||||
|
||||
#import "KPKXmlUtilities.h"
|
||||
#import "NSString+XMLUtilities.h"
|
||||
|
||||
@interface KPKTextXMLUtilities : XCTestCase
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
}
|
||||
|
||||
- (void)testExample {
|
||||
NSString *safe = stripUnsafeCharacterForXMLFromString(@"*EORDIE\x10\x16\x12\x10");
|
||||
XCTAssertEqualObjects(@"*EORDIE", safe);
|
||||
NSString *unsave = @"*EORDIE\x10\x16\x12\x10";
|
||||
XCTAssertEqualObjects(@"*EORDIE", unsave.XMLCompatibleString);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user