mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
Add unit test.
This commit is contained in:
@@ -235,6 +235,25 @@ namespace Terminal.Gui.TopLevelTests {
|
||||
│└────────────────┘│
|
||||
│ ^Q Quit │ ^O Open│
|
||||
└──────────────────┘", output);
|
||||
}
|
||||
|
||||
[Fact, AutoInitShutdown]
|
||||
public void Activating_MenuBar_By_F9_Does_Not_Throw ()
|
||||
{
|
||||
var menu = new MenuBar (new MenuBarItem [] {
|
||||
new MenuBarItem ("Child", new MenuItem [] {
|
||||
new MenuItem ("_Create Child", "", null)
|
||||
})
|
||||
});
|
||||
var win = new Window ();
|
||||
win.Add (menu);
|
||||
Application.Top.Add (win);
|
||||
Application.Begin (Application.Top);
|
||||
|
||||
var exception = Record.Exception (() => win.ProcessHotKey (new KeyEvent (Key.AltMask, new KeyModifiers { Alt = true })));
|
||||
Assert.Null (exception);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user