#!/bin/bash

##################################
### Check detail option output ###
##################################

set -eo pipefail

low="$(logwatch --detail Low --range all --service all --output stdout | wc -l)"
high="$(logwatch --detail High --range all --service all --output stdout | wc -l)"
med="$(logwatch --detail Med --range all --service all --output stdout | wc -l)"

echo "Checking that Low detail is less than Med detail"
test "${low}" -lt "${med}"
echo "Checking that Med detail is less High detail"
test "${med}" -lt "${high}"
