mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-30 17:57:57 +01:00
Fix test
This commit is contained in:
@@ -22,11 +22,12 @@ namespace Terminal.Gui.Core {
|
||||
{
|
||||
var dlg = GetInitializedFileDialog ();
|
||||
|
||||
Send ('.', ConsoleKey.OemPeriod);
|
||||
SendSlash ();
|
||||
|
||||
// Entering ./ replaces current text with the full path
|
||||
Assert.Equal (Environment.CurrentDirectory + Path.DirectorySeparatorChar, dlg.Path);
|
||||
Assert.Equal (
|
||||
new DirectoryInfo(Environment.CurrentDirectory + Path.DirectorySeparatorChar).FullName,
|
||||
new DirectoryInfo(dlg.Path + Path.DirectorySeparatorChar).FullName
|
||||
);
|
||||
|
||||
// continue typing the rest of the path
|
||||
Send ("bob");
|
||||
@@ -35,7 +36,7 @@ namespace Terminal.Gui.Core {
|
||||
|
||||
Assert.True (dlg.Canceled);
|
||||
|
||||
SendEnter ();
|
||||
Send ('\n', ConsoleKey.Enter, false);
|
||||
Assert.False (dlg.Canceled);
|
||||
Assert.Equal ("bob.csv", Path.GetFileName (dlg.Path));
|
||||
}
|
||||
@@ -92,10 +93,6 @@ namespace Terminal.Gui.Core {
|
||||
}
|
||||
|
||||
}
|
||||
private void SendEnter ()
|
||||
{
|
||||
Application.Driver.SendKeys ('\n', ConsoleKey.Enter, false, false, false);
|
||||
}
|
||||
|
||||
[Fact,AutoInitShutdown]
|
||||
public void Autocomplete_NoSuggestion_WhenTextMatchesExactly ()
|
||||
|
||||
Reference in New Issue
Block a user