+2013-04-12 Vladimir Serbinenko <phcoder@gmail.com>
+
+ * tests/grub_cmd_date.in: New test for datetime.
+
2013-04-12 Vladimir Serbinenko <phcoder@gmail.com>
* tests/partmap_test.in: Fix missing qemudisk setting.
common = tests/grub_cmd_regexp.in;
};
+script = {
+ testcase;
+ name = grub_cmd_date;
+ common = tests/grub_cmd_date.in;
+};
+
script = {
testcase;
name = grub_script_expansion;
--- /dev/null
+#! /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"