From 8d255ffe37a4c4f6fa5a59a145a18a2d45e953a0 Mon Sep 17 00:00:00 2001 From: tznind Date: Sat, 25 Feb 2023 22:48:13 +0000 Subject: [PATCH] Fix test --- UnitTests/FileDialog2Tests.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/UnitTests/FileDialog2Tests.cs b/UnitTests/FileDialog2Tests.cs index 15d3a69f9..8cfe5630b 100644 --- a/UnitTests/FileDialog2Tests.cs +++ b/UnitTests/FileDialog2Tests.cs @@ -21,6 +21,10 @@ namespace Terminal.Gui.Core { public void DirectTyping_Allowed () { var dlg = GetInitializedFileDialog (); + var tf = dlg.Subviews [0].Subviews.OfType ().Single(); + tf.ClearAllSelection (); + tf.CursorPosition = tf.Text.Length; + Assert.True (tf.HasFocus); SendSlash (); @@ -44,9 +48,9 @@ namespace Terminal.Gui.Core { private void SendSlash () { if(Path.DirectorySeparatorChar == '/') { - Send ("/"); + Send ('/', ConsoleKey.Separator, false); } else { - Send ('\\', ConsoleKey.Separator,true); + Send ('\\', ConsoleKey.Separator,false); } }