From: Peter Krempa Date: Tue, 28 Mar 2017 11:35:05 +0000 (+0200) Subject: schema: Introduce schema for the news.xml file X-Git-Tag: v3.3.0-rc1~312 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fe26b28564cb38faed14a4961beda9db353f9d23;p=thirdparty%2Flibvirt.git schema: Introduce schema for the news.xml file Since this file gets changed (and broken) rather often, introduce a schema file so that the test suite can validate it. --- diff --git a/docs/news.xml b/docs/news.xml index db62279229..014a439f19 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -17,6 +17,8 @@ Lines should be kept under 80 columns, and should not exceed 100 columns. + This file is validated against docs/schemas/news.rng schema. + Use the following template to add a new release section: diff --git a/docs/schemas/news.rng b/docs/schemas/news.rng new file mode 100644 index 0000000000..94a6870c18 --- /dev/null +++ b/docs/schemas/news.rng @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + v[0-9]+\.[0-9]+\.[0-9]+ + + + + + [0-9]{4}-[0-9]{2}-[0-9]{2}|unreleased + + + + + + + + + + + + + + + + + + + + + + + + + \n[^\n]+\n + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/virschematest.c b/tests/virschematest.c index b73555da82..4f194804af 100644 --- a/tests/virschematest.c +++ b/tests/virschematest.c @@ -236,6 +236,8 @@ mymain(void) DO_TEST_DIR("storagevol.rng", "storagevolxml2xmlin", "storagevolxml2xmlout", "storagevolschemadata"); + DO_TEST_FILE("news.rng", "../docs/news.xml"); + return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE; }