From d7ed5335b90175300349669fd102c4d44b05c381 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 29 Jul 2020 23:11:56 +0300 Subject: Add implementation --- libexpat/tests/basic/buildfile | 6 ++++++ libexpat/tests/basic/driver.c | 21 +++++++++++++++++++++ libexpat/tests/basic/testscript | 6 ++++++ 3 files changed, 33 insertions(+) create mode 100644 libexpat/tests/basic/buildfile create mode 100644 libexpat/tests/basic/driver.c create mode 100644 libexpat/tests/basic/testscript (limited to 'libexpat/tests/basic') diff --git a/libexpat/tests/basic/buildfile b/libexpat/tests/basic/buildfile new file mode 100644 index 0000000..b64f25a --- /dev/null +++ b/libexpat/tests/basic/buildfile @@ -0,0 +1,6 @@ +# file : tests/basic/buildfile +# license : MIT; see accompanying COPYING file + +import libs = libexpat%lib{expat} + +exe{driver}: {h c}{**} $libs testscript diff --git a/libexpat/tests/basic/driver.c b/libexpat/tests/basic/driver.c new file mode 100644 index 0000000..067b96b --- /dev/null +++ b/libexpat/tests/basic/driver.c @@ -0,0 +1,21 @@ +/* file : tests/basic/driver.c + * license : MIT; see accompanying COPYING file + */ + +#include +#include + +#include + +int +main () +{ + XML_Expat_Version v = XML_ExpatVersionInfo (); + + assert (v.major == XML_MAJOR_VERSION && + v.minor == XML_MINOR_VERSION && + v.micro == XML_MICRO_VERSION); + + printf ("version: %d.%d.%d\n", v.major, v.minor, v.micro); + return 0; +} diff --git a/libexpat/tests/basic/testscript b/libexpat/tests/basic/testscript new file mode 100644 index 0000000..d9037da --- /dev/null +++ b/libexpat/tests/basic/testscript @@ -0,0 +1,6 @@ +# file : tests/basic/testscript +# license : MIT; see accompanying COPYING file + +: version +: +$* >~'%version: \d+.\d+.\d+%d' -- cgit v1.1