Files
Terminal.Gui/Tests/UnitTests/Input/Keyboard/KeyTests.cs
Tig fdeaa8331b Fixes #4298 - Updates test namespaces (#4299)
* Refactored test namespaces.
Moved some tests that were in wrong project.
Code cleanup

* Parrallel -> Parallel
2025-10-20 14:14:38 -06:00

24 lines
656 B
C#

using System.Text;
namespace UnitTests.InputTests;
public class KeyTests
{
[Fact]
public void Set_Key_Separator_With_Rune_Default_Ensure_Using_The_Default_Plus ()
{
Key key = new (Key.A.WithCtrl);
Assert.Equal ((Rune)'+', Key.Separator);
Assert.Equal ("Ctrl+A", key.ToString ());
// NOTE: This means this test can't be parallelized
Key.Separator = new ('-');
Assert.Equal ((Rune)'-', Key.Separator);
Assert.Equal ("Ctrl-A", key.ToString ());
Key.Separator = new ();
Assert.Equal ((Rune)'+', Key.Separator);
Assert.Equal ("Ctrl+A", key.ToString ());
}
}