* tests/grub_cmd_date.in: New test for datetime.
This commit is contained in:
parent
f9d4005539
commit
e3734b84cf
3 changed files with 22 additions and 0 deletions
12
tests/grub_cmd_date.in
Normal file
12
tests/grub_cmd_date.in
Normal file
|
@ -0,0 +1,12 @@
|
|||
#! /bin/bash
|
||||
set -e
|
||||
|
||||
pdt="$(date -u +%s)"
|
||||
dt=`echo date | @builddir@/grub-shell`
|
||||
dtg="$(date -u -d "$dt" +%s)"
|
||||
ndt="$(date -u +%s)"
|
||||
|
||||
if [ $pdt -le $dtg ] && [ $dtg -le $ndt ]; then
|
||||
exit 0;
|
||||
fi
|
||||
echo "Date not in range: $pdt <= $dtg <= $ndt"
|
Loading…
Add table
Add a link
Reference in a new issue