mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Remove minus since it's an invalid literal
This commit is contained in:
parent
e803076063
commit
6d046f251e
@ -616,7 +616,7 @@ bool AutoType::checkSyntax(const QString& string)
|
||||
// the ":" allows custom commands with syntax S:Field
|
||||
// exclude BEEP otherwise will be checked as valid
|
||||
QString normalCommands = "(?!BEEP\\s)[A-Z:]*" + allowRepetition;
|
||||
QString specialLiterals = "[\\^\\%\\(\\)~\\{\\}\\[\\]\\+-]" + allowRepetition;
|
||||
QString specialLiterals = "[\\^\\%\\(\\)~\\{\\}\\[\\]\\+]" + allowRepetition;
|
||||
QString functionKeys = "(?:F[1-9]" + allowRepetition + "|F1[0-2])" + allowRepetition;
|
||||
QString numpad = "NUMPAD\\d" + allowRepetition;
|
||||
QString delay = "DELAY=\\d+";
|
||||
|
@ -31,7 +31,6 @@
|
||||
#include <QTemporaryFile>
|
||||
#include <QMimeData>
|
||||
#include <QEvent>
|
||||
#include <iostream>
|
||||
|
||||
#include "autotype/AutoType.h"
|
||||
#include "core/Config.h"
|
||||
|
@ -286,7 +286,7 @@ void TestAutoType::testGlobalAutoTypeRegExp()
|
||||
void TestAutoType::testAutoTypeSyntaxChecks()
|
||||
{
|
||||
// Huge sequence
|
||||
QCOMPARE(true, AutoType::checkSyntax("{word 23}{F1 23}{~ 23}{% 23}{^}{F12}{(}{) 23}{[}{[}{]}{Delay=23}{+}{-}~+%@fixedstring"));
|
||||
QCOMPARE(true, AutoType::checkSyntax("{word 23}{F1 23}{~ 23}{% 23}{^}{F12}{(}{) 23}{[}{[}{]}{Delay=23}{+}{SUBTRACT}~+%@fixedstring"));
|
||||
|
||||
QCOMPARE(true, AutoType::checkSyntax("{NUMPAD1 3}"));
|
||||
|
||||
@ -298,6 +298,10 @@ void TestAutoType::testAutoTypeSyntaxChecks()
|
||||
QCOMPARE(true, AutoType::checkSyntax("{VKEY-EX 0x01}"));
|
||||
// Bad sequence
|
||||
QCOMPARE(false, AutoType::checkSyntax("{{{}}{}{}}{{}}"));
|
||||
// Good sequence
|
||||
QCOMPARE(true, AutoType::checkSyntax("{{}{}}{}}{{}"));
|
||||
QCOMPARE(true, AutoType::checkSyntax("{]}{[}{[}{]}"));
|
||||
QCOMPARE(true, AutoType::checkSyntax("{)}{(}{(}{)}"));
|
||||
// High DelAY / low delay
|
||||
QCOMPARE(true, AutoType::checkHighDelay("{DelAY 50000}"));
|
||||
QCOMPARE(false, AutoType::checkHighDelay("{delay 50}"));
|
||||
|
Loading…
Reference in New Issue
Block a user