On main: cline checkpoint session=1789068735674_bk9xf run=1
This commit is contained in:
commit
f894c2a69c
11 files changed
+700
-112
No files matched your search
@@ -113,6 +113,29 @@ static void testAuthFailed_ignoresPacmanErrors() {
|
||||
assert(!PacmanManager::authFailed("warning: firefox is up to date"));
|
||||
}
|
||||
|
||||
static void testDbLocked_detectsEnglishLock() {
|
||||
assert(PacmanManager::dbLocked(
|
||||
"error: failed to synchronize all databases (unable to lock database)"));
|
||||
}
|
||||
|
||||
static void testDbLocked_detectsFrenchLock() {
|
||||
assert(PacmanManager::dbLocked(
|
||||
"erreur : la synchronisation de toutes les bases de données a échoué "
|
||||
"(verrouillage de la base de données impossible)"));
|
||||
}
|
||||
|
||||
static void testDbLocked_detectsLockFile() {
|
||||
assert(PacmanManager::dbLocked(
|
||||
"error: failed to init transaction (unable to lock database)\n"
|
||||
" if you're sure a package manager is not already running, you can "
|
||||
"remove /var/lib/pacman/db.lck"));
|
||||
}
|
||||
|
||||
static void testDbLocked_ignoresUnrelatedErrors() {
|
||||
assert(!PacmanManager::dbLocked("error: target not found: firefox"));
|
||||
assert(!PacmanManager::dbLocked("Mise à jour terminée"));
|
||||
}
|
||||
|
||||
int main() {
|
||||
testParseInstalledOutput_parsesSimpleLines();
|
||||
testParseInstalledOutput_keepsHyphensInNames();
|
||||
@@ -132,6 +155,11 @@ int main() {
|
||||
testAuthFailed_detectsMissingPassword();
|
||||
testAuthFailed_ignoresPacmanErrors();
|
||||
|
||||
testDbLocked_detectsEnglishLock();
|
||||
testDbLocked_detectsFrenchLock();
|
||||
testDbLocked_detectsLockFile();
|
||||
testDbLocked_ignoresUnrelatedErrors();
|
||||
|
||||
std::cout << "All pacman-manager tests passed." << std::endl;
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user