mirror of
https://github.com/CyberMind-FR/secubox-deb.git
synced 2026-07-28 21:17:36 +00:00
Brainstormed design for adding the SPDX-CMSD-1.0 header to every first-party source file (~2,170 across 6 languages), backed by a reusable Python tool (scripts/license-headers.py), a CI check, and a phased per-package rollout. Spec covers scope, header rendering per language, placement rules, tool architecture, CI integration with an enrollment allowlist, and verification steps. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
33 lines
677 B
Bash
33 lines
677 B
Bash
# scripts/lib/test-helpers.sh
|
|
# Sourced by test scripts. No external deps.
|
|
|
|
assert_eq() {
|
|
local expected="$1" actual="$2" msg="${3:-}"
|
|
if [[ "$expected" != "$actual" ]]; then
|
|
echo "FAIL: ${msg}"
|
|
echo " expected: $expected"
|
|
echo " actual: $actual"
|
|
return 1
|
|
fi
|
|
}
|
|
|
|
assert_contains() {
|
|
local haystack="$1" needle="$2" msg="${3:-}"
|
|
if [[ "$haystack" != *"$needle"* ]]; then
|
|
echo "FAIL: ${msg}"
|
|
echo " haystack: $haystack"
|
|
echo " needle: $needle"
|
|
return 1
|
|
fi
|
|
}
|
|
|
|
assert_file() {
|
|
local path="$1" msg="${2:-file missing}"
|
|
if [[ ! -f "$path" ]]; then
|
|
echo "FAIL: ${msg}: $path"
|
|
return 1
|
|
fi
|
|
}
|
|
|
|
pass() { echo "PASS: $*"; }
|