On main: cline checkpoint session=1789145782869_xv3bv run=1

This commit is contained in:
git stash committed 2026-09-11 18:56:24 +02:00
commit 253dd21464
11 files changed
+700 -112

No files matched your search

+28
View File
@@ -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;
}