From: Michael D. Lowis Date: Wed, 7 Dec 2016 21:28:02 +0000 (-0500) Subject: added tests for change focus and normal input X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=ab08009c4c9e71d83134aaf39f6d61d95ac487ea;p=projs%2Ftide.git added tests for change focus and normal input --- diff --git a/tests/xedit.c b/tests/xedit.c index 89673c3..068f13f 100644 --- a/tests/xedit.c +++ b/tests/xedit.c @@ -373,4 +373,27 @@ TEST_SUITE(XeditTests) { CHECK(getsel(EDIT)->beg == 2); CHECK(getsel(EDIT)->end == 2); } + + /* Key Handling - Normal Input + *************************************************************************/ + TEST(input not matching a shortcut should be inserted as text) { + setup_view(EDIT, "", 0); + send_keys(ModNone, 'e'); + CHECK(getsel(EDIT)->beg == 1); + CHECK(getsel(EDIT)->end == 1); + } + + /* Key Handling - Implementation Specific + *************************************************************************/ + TEST(ctrl+t should switch focus to EDIT view) { + Focused = TAGS; + send_keys(ModCtrl, 't'); + CHECK(Focused == EDIT); + } + + TEST(ctrl+t should switch focus to TAGs view) { + Focused = EDIT; + send_keys(ModCtrl, 't'); + CHECK(Focused == TAGS); + } }