History tests/scripts/functions