Browse Source

fixed unit test that proves 'wrong' key behavior is broken

Charlie Kindel 2 years ago
parent
commit
c7f4392957
1 changed files with 4 additions and 3 deletions
  1. 4 3
      UnitTests/CollectionNavigatorTests.cs

+ 4 - 3
UnitTests/CollectionNavigatorTests.cs

@@ -266,7 +266,8 @@ namespace Terminal.Gui.Core {
 			    "can",
 			    "candle",
 			    "candy",
-			    "yellow"
+			    "yellow",
+				"zebra"
 			  };
 			int current = 0;
 			var n = new CollectionNavigator (strings);
@@ -298,8 +299,8 @@ namespace Terminal.Gui.Core {
 			Assert.Equal ("ca", n.SearchString);
 			Assert.Equal (strings.IndexOf ("can"), current = n.GetNextMatchingItem (current, 'n'));
 			Assert.Equal ("can", n.SearchString);
-			Assert.Equal (strings.IndexOf ("candle"), current = n.GetNextMatchingItem (current, 'z'));
-			Assert.Equal ("cand", n.SearchString);
+			Assert.Equal (strings.IndexOf ("can"), current = n.GetNextMatchingItem (current, 'z')); // Shouldn't move
+			Assert.Equal ("can", n.SearchString); // Shouldn't change
 		}
 
 		[Fact]