Removed duplicate paste commands for autotype

This commit is contained in:
michael starke
2014-08-20 01:42:55 +02:00
parent 55d1644b17
commit d1fc013f1c
4 changed files with 18 additions and 7 deletions

View File

@@ -50,14 +50,11 @@
MPAutotypeContext *context = [[MPAutotypeContext alloc] initWithEntry:entry andSequence:@"{USERNAME}{TAB}{PASSWORD}{ENTER}"];
NSArray *commands = [MPAutotypeCommand commandsForContext:context];
XCTAssert([commands count] == 7);
XCTAssert([commands count] == 4);
XCTAssert([commands[0] isKindOfClass:[MPAutotypePaste class]]);
XCTAssert([commands[1] isKindOfClass:[MPAutotypePaste class]]);
XCTAssert([commands[1] isKindOfClass:[MPAutotypeKeyPress class]]);
XCTAssert([commands[2] isKindOfClass:[MPAutotypePaste class]]);
XCTAssert([commands[3] isKindOfClass:[MPAutotypeKeyPress class]]);
XCTAssert([commands[4] isKindOfClass:[MPAutotypePaste class]]);
XCTAssert([commands[5] isKindOfClass:[MPAutotypePaste class]]);
XCTAssert([commands[6] isKindOfClass:[MPAutotypeKeyPress class]]);
context = [[MPAutotypeContext alloc] initWithEntry:entry andSequence:@"^T{USERNAME}%+^{TAB}Whoo{PASSWORD}{ENTER}"];
commands = [MPAutotypeCommand commandsForContext:context];