#!/bin/sh

set -eu

out=$(ddate +'Today is %{%A, the %e of %B%}, %Y. %N%nCelebrate %H')
if ! (echo "$out" | grep "Today is"); then
        exit 1
fi
if ! (echo "$out" | grep -E "(Sweetmorn|Boomtime|Pungenday|Prickle-Prickle|Setting Orange)"); then
        exit 1
fi

out=$(ddate +"It's %{%A, the %e of %B%}, %Y. %N%nCelebrate %H" 26 9 1995)
if ! (echo "$out" | grep "Prickle-Prickle"); then
        exit 1
fi
if ! (echo "$out" | grep "Bureflux"); then
	exit 1
fi

out=$(ddate +"Today is %{%A, the %e of %B%}, %Y. %N%nCelebrate %H" 29 2 1996)
if ! (echo "$out" | grep "St. Tib"); then
        exit 1
fi

exit 0
