Fix test assertion pattern and replace em dashes in new log messages
This commit is contained in:
@@ -477,9 +477,9 @@ _create_archive_impl() {
|
||||
elif [[ "$mode" == "HOME" && "$tar_rc" -eq 1 && "$has_fatal_diag" -eq 0 ]]; then
|
||||
accept=1
|
||||
log "NOTE: $archive_name completed with nonfatal warnings (live files changed" \
|
||||
"during backup — this is normal on an active desktop and does not affect" \
|
||||
"during backup -- this is normal on an active desktop and does not affect" \
|
||||
"the safety of your backup)."
|
||||
ARCHIVE_WARNINGS+=("$archive_name: nonfatal warnings — live files changed during backup (normal on an active desktop)")
|
||||
ARCHIVE_WARNINGS+=("$archive_name: nonfatal warnings -- live files changed during backup (normal on an active desktop)")
|
||||
fi
|
||||
|
||||
if [[ "$accept" -eq 0 ]]; then
|
||||
|
||||
@@ -649,7 +649,7 @@ fail "tar exited with code 2"
|
||||
source = BACKUP_SCRIPT.read_text()
|
||||
# Both constructs must be present
|
||||
self.assertIn(
|
||||
"#ARCHIVE_WARNINGS[@]}\" -gt 0",
|
||||
"${#ARCHIVE_WARNINGS[@]}",
|
||||
source,
|
||||
"backup script must check ARCHIVE_WARNINGS count before success message",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user