Closed rherrmann closed 10 years ago
Testcase (insert into GitConsoleInputPDETest
)
@Test
public void testCorrectEnteredCommand() {
String repositoryName = "repo";
console.open( configurer.createConfigurer( repositoryName ) );
console.typeText( "commit msg" );
console.positionCaret( ( repositoryName + PROMPT_POSTFIX + "commit").length() );
console.typeText( " " );
new DisplayHelper().flushPendingEvents();
console.typeText( "-" );
new DisplayHelper().flushPendingEvents();
console.typeText( "m" );
new DisplayHelper().flushPendingEvents();
assertThat( console )
.containsLines( line( "repo", "commit -m msg" ) );
}
For example, type
commit "message"
and then try to insert the missing-m
between commit and message. You will notice that the cursor is placed at the end of the line after each char that you typed.