diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2020-07-29 23:11:56 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2020-07-31 13:28:47 +0300 |
commit | d7ed5335b90175300349669fd102c4d44b05c381 (patch) | |
tree | 700e84d023d25c82dd75931eae2b1a1312e96947 /libexpat/tests/basic | |
parent | 2a98ae9d1b795b398d53996e35ae50b63aba3774 (diff) |
Add implementation
Diffstat (limited to 'libexpat/tests/basic')
-rw-r--r-- | libexpat/tests/basic/buildfile | 6 | ||||
-rw-r--r-- | libexpat/tests/basic/driver.c | 21 | ||||
-rw-r--r-- | libexpat/tests/basic/testscript | 6 |
3 files changed, 33 insertions, 0 deletions
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 <stdio.h> +#include <assert.h> + +#include <expat.h> + +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' |