diff options
author | thez3ro <io@thezero.org> | 2017-12-28 16:12:17 +0300 |
---|---|---|
committer | thez3ro <io@thezero.org> | 2018-01-03 14:56:18 +0300 |
commit | e8030760632f224a85c6b9c19ff890d2811847ee (patch) | |
tree | 81d88613e4b6c912c049f991231cf3795daf977c /tests | |
parent | 203960b4b51837e1a73edb8f00794b1ae0778ed7 (diff) |
improve regex filtering
Diffstat (limited to 'tests')
-rw-r--r-- | tests/TestAutoType.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/TestAutoType.cpp b/tests/TestAutoType.cpp index d1c09c263..da245d8cb 100644 --- a/tests/TestAutoType.cpp +++ b/tests/TestAutoType.cpp @@ -287,11 +287,23 @@ void TestAutoType::testAutoTypeSyntaxChecks() { // Huge sequence QCOMPARE(true, AutoType::checkSyntax("{word 23}{F1 23}{~ 23}{% 23}{^}{F12}{(}{) 23}{[}{[}{]}{Delay=23}{+}{-}~+%@fixedstring")); + + QCOMPARE(true, AutoType::checkSyntax("{NUMPAD1 3}")); + + QCOMPARE(true, AutoType::checkSyntax("{BEEP 3 3}")); + QCOMPARE(false, AutoType::checkSyntax("{BEEP 3}")); + + QCOMPARE(true, AutoType::checkSyntax("{VKEY 0x01}")); + QCOMPARE(true, AutoType::checkSyntax("{VKEY VK_LBUTTON}")); + QCOMPARE(true, AutoType::checkSyntax("{VKEY-EX 0x01}")); // Bad sequence QCOMPARE(false, AutoType::checkSyntax("{{{}}{}{}}{{}}")); // High DelAY / low delay QCOMPARE(true, AutoType::checkHighDelay("{DelAY 50000}")); QCOMPARE(false, AutoType::checkHighDelay("{delay 50}")); + // Slow typing + QCOMPARE(true, AutoType::checkSlowKeypress("{DelAY=50000}")); + QCOMPARE(false, AutoType::checkSlowKeypress("{delay=50}")); // Many repetition / few repetition / delay not repetition QCOMPARE(true, AutoType::checkHighRepetition("{LEFT 50000000}")); QCOMPARE(false, AutoType::checkHighRepetition("{SPACE 10}{TAB 3}{RIGHT 50}")); |