mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-05-02 06:36:07 -04:00
improve regex filtering
This commit is contained in:
parent
203960b4b5
commit
e803076063
4 changed files with 88 additions and 82 deletions
|
@ -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}"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue