From c4e5ef61982b2ffc84940e38b76690b76e8f405e Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Sat, 2 May 2015 18:51:39 +0100 Subject: [PATCH] add xml format check Signed-off-by: Sami Kerola --- tests/Makemodule.am | 1 + tests/expected/same-twice-xml | 21 +++++++++++++++++++++ tests/full-xml | 13 +++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 tests/expected/same-twice-xml create mode 100755 tests/full-xml diff --git a/tests/Makemodule.am b/tests/Makemodule.am index fdb48be..07e55ae 100644 --- a/tests/Makemodule.am +++ b/tests/Makemodule.am @@ -13,6 +13,7 @@ TESTS = \ tests/complete \ tests/empty \ tests/full-json \ + tests/full-xml \ tests/leading0 \ tests/one-ip \ tests/one-line \ diff --git a/tests/expected/same-twice-xml b/tests/expected/same-twice-xml new file mode 100644 index 0000000..93612d6 --- /dev/null +++ b/tests/expected/same-twice-xml @@ -0,0 +1,21 @@ + + + 10.0.0.5 + 00:00:00:00:00:00 + + + All networks + 10.0.0.1 - 10.0.0.10 + 10 + 1 + 0 + 9 + + + All networks + 10 + 1 + 0 + 9 + + diff --git a/tests/full-xml b/tests/full-xml new file mode 100755 index 0000000..33fce2c --- /dev/null +++ b/tests/full-xml @@ -0,0 +1,13 @@ +#!/bin/sh +# +# Minimal regression test suite. + +if [ ! -d tests/outputs ]; then + mkdir tests/outputs +fi + +dhcpd-pools -f X -c $top_srcdir/tests/confs/same-twice \ + -l $top_srcdir/tests/leases/same-twice \ + -o tests/outputs/same-twice-xml +diff -u $top_srcdir/tests/expected/same-twice-xml tests/outputs/same-twice-xml +exit $?