Skip to content

Commit 2d46a78

Browse files
committed
Adding ViTestComplete to reproduce a reported failure.
1 parent dc522cd commit 2d46a78

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

UnitTestPSReadLine/BasicEditingTest.VI.cs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ public void ViTestPercent()
514514
_.Percent, CheckThat(() => AssertCursorLeftIs(9)),
515515
'd', _.Percent, CheckThat(() => AssertLineIs("012 bc")),
516516
"uh", CheckThat(() => AssertLineIs("012 [ 67 ] bc")), CheckThat(() => AssertCursorLeftIs(9)),
517-
'c', _.Percent, "99", _.Escape, CheckThat(() => AssertLineIs( "012 99 bc")),
517+
'c', _.Percent, "99", _.Escape, CheckThat(() => AssertLineIs("012 99 bc")),
518518
'u'
519519
));
520520

@@ -796,5 +796,19 @@ public void ViTestChangeChar()
796796
'u'
797797
));
798798
}
799+
800+
[TestMethod]
801+
public void ViTestComplete()
802+
{
803+
TestSetup(KeyMode.Vi);
804+
805+
PSConsoleReadLine.SetKeyHandler(new[] { "Tab" }, PSConsoleReadLine.Complete, "", "");
806+
807+
Test("ambiguousness", Keys(
808+
"ambag", CheckThat(() => AssertLineIs("ambag")),
809+
_.Escape, "hCig", _.Tab, CheckThat(() => AssertLineIs("ambiguous1")),
810+
_.Escape, "Cness"
811+
));
812+
}
799813
}
800814
}

0 commit comments

Comments
 (0)