Skip to content

Commit 3a97b70

Browse files
springcompdaxian-dbw
authored andcommitted
Fixed some unit-tests that were relying on an implicit definition of "_" at the top of the file. (#886)
* Added missing [SkippableFact] attribute to prevent test from failing instead of being skipped. * Fix failing unit-tests that used an aliased member which defaults to handling upper case/lower case keys differently. Previously, sequence of keys were interpreted using a language hack at the top of the file. The "using _ = Keys;" statement defaulted to a class that contained both "K" and "ucK" for lower-case 'K' and upper-case 'K' respectively. Now, "_" is a member of the class that points to a "KbdLayout" class with members "k" and "K" respectively. Therefore, the unit-test was broken when the definition of "_" changed.
1 parent 905ab44 commit 3a97b70

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/MovementTest.VI.Multiline.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public void ViMoveToFirstLogicalLine_MustDing_ForSingleLine()
5858
ViJumpMustDing(buffer, keys);
5959
}
6060

61-
[Fact]
61+
[SkippableFact]
6262
public void ViMoveToFirstNonBlankOfLogicalLineThenJumpToEndOfLogicalLine()
6363
{
6464
TestSetup(KeyMode.Vi);
@@ -77,7 +77,7 @@ public void ViMoveToFirstNonBlankOfLogicalLineThenJumpToEndOfLogicalLine()
7777
));
7878
}
7979

80-
[Fact]
80+
[SkippableFact]
8181
public void ViMoveToFirstNonBlankOfLogicalLine_NoOp_OnEmptyLine()
8282
{
8383
TestSetup(KeyMode.Vi);
@@ -87,13 +87,13 @@ public void ViMoveToFirstNonBlankOfLogicalLine_NoOp_OnEmptyLine()
8787
const string buffer = "\"\n\n\"";
8888

8989
Test(buffer, Keys(
90-
_.DQuote, _.Enter, _.Enter, _.DQuote, _.Escape, _.K,
90+
_.DQuote, _.Enter, _.Enter, _.DQuote, _.Escape, _.k,
9191
CheckThat(() => AssertCursorLeftTopIs(continuationPrefixLength + 0, 1)),
9292
_.Underbar, CheckThat(() => AssertCursorLeftTopIs(continuationPrefixLength + 0, 1))
9393
));
9494
}
9595

96-
[Fact]
96+
[SkippableFact]
9797
public void ViMoveToEndOfLine_NoOp_OnEmptyLine()
9898
{
9999
TestSetup(KeyMode.Vi);
@@ -103,7 +103,7 @@ public void ViMoveToEndOfLine_NoOp_OnEmptyLine()
103103
const string buffer = "\"\n\n\"";
104104

105105
Test(buffer, Keys(
106-
_.DQuote, _.Enter, _.Enter, _.DQuote, _.Escape, _.K,
106+
_.DQuote, _.Enter, _.Enter, _.DQuote, _.Escape, _.k,
107107
CheckThat(() => AssertCursorLeftTopIs(continuationPrefixLength + 0, 1)),
108108
_.Dollar, CheckThat(() => AssertCursorLeftTopIs(continuationPrefixLength + 0, 1))
109109
));

0 commit comments

Comments
 (0)