mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Fix passphrase generator test (#10890)
* Fix passphrase generator test Previously, the test case was assuming the wrong regex. In particular, the default word list (eff_large.wordlist) contains several words that contain dashes. Adjust the regex used in the test to reflect this. This should fix rare test failures
This commit is contained in:
parent
64eb3d0c82
commit
abcff25e57
@ -49,6 +49,6 @@ void TestPassphraseGenerator::testWordCase()
|
||||
|
||||
generator.setWordCase(PassphraseGenerator::TITLECASE);
|
||||
passphrase = generator.generatePassphrase();
|
||||
QRegularExpression regex("^([A-Z][a-z]* ?)+$");
|
||||
QVERIFY(regex.match(passphrase).hasMatch());
|
||||
QRegularExpression regex("^(?:[A-Z][a-z-]* )*[A-Z][a-z-]*$");
|
||||
QVERIFY2(regex.match(passphrase).hasMatch(), qPrintable(passphrase));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user