summaryrefslogtreecommitdiff
path: root/libexpat/tests
diff options
context:
space:
mode:
Diffstat (limited to 'libexpat/tests')
-rw-r--r--libexpat/tests/.gitignore8
-rw-r--r--libexpat/tests/basic/buildfile6
-rw-r--r--libexpat/tests/basic/driver.c21
-rw-r--r--libexpat/tests/basic/testscript6
-rw-r--r--libexpat/tests/build/.gitignore3
-rw-r--r--libexpat/tests/build/bootstrap.build8
-rw-r--r--libexpat/tests/build/root.build21
-rw-r--r--libexpat/tests/buildfile4
l---------libexpat/tests/regression/ascii.h1
-rw-r--r--libexpat/tests/regression/buildfile6
l---------libexpat/tests/regression/chardata.c1
l---------libexpat/tests/regression/chardata.h1
l---------libexpat/tests/regression/internal.h1
l---------libexpat/tests/regression/memcheck.c1
l---------libexpat/tests/regression/memcheck.h1
l---------libexpat/tests/regression/minicheck.c1
l---------libexpat/tests/regression/minicheck.h1
l---------libexpat/tests/regression/runtests.c1
l---------libexpat/tests/regression/siphash.h1
l---------libexpat/tests/regression/structdata.c1
l---------libexpat/tests/regression/structdata.h1
-rw-r--r--libexpat/tests/regression/testscript9
22 files changed, 104 insertions, 0 deletions
diff --git a/libexpat/tests/.gitignore b/libexpat/tests/.gitignore
new file mode 100644
index 0000000..662178d
--- /dev/null
+++ b/libexpat/tests/.gitignore
@@ -0,0 +1,8 @@
+# Test executables.
+#
+driver
+
+# Testscript output directories (can be symlinks).
+#
+test
+test-*
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'
diff --git a/libexpat/tests/build/.gitignore b/libexpat/tests/build/.gitignore
new file mode 100644
index 0000000..4a730a3
--- /dev/null
+++ b/libexpat/tests/build/.gitignore
@@ -0,0 +1,3 @@
+config.build
+root/
+bootstrap/
diff --git a/libexpat/tests/build/bootstrap.build b/libexpat/tests/build/bootstrap.build
new file mode 100644
index 0000000..d7f6bee
--- /dev/null
+++ b/libexpat/tests/build/bootstrap.build
@@ -0,0 +1,8 @@
+# file : tests/build/bootstrap.build
+# license : MIT; see accompanying COPYING file
+
+project = # Unnamed tests subproject.
+
+using config
+using test
+using dist
diff --git a/libexpat/tests/build/root.build b/libexpat/tests/build/root.build
new file mode 100644
index 0000000..2d95750
--- /dev/null
+++ b/libexpat/tests/build/root.build
@@ -0,0 +1,21 @@
+# file : tests/build/root.build
+# license : MIT; see accompanying COPYING file
+
+using c
+
+h{*}: extension = h
+c{*}: extension = c
+
+if ($c.target.system == 'win32-msvc')
+ c.poptions += -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS
+
+if ($c.class == 'msvc')
+ c.coptions += /wd4251 /wd4275 /wd4800
+
+# Every exe{} in this subproject is by default a test.
+#
+exe{*}: test = true
+
+# The test target for cross-testing (running tests under Wine, etc).
+#
+test.target = $c.target
diff --git a/libexpat/tests/buildfile b/libexpat/tests/buildfile
new file mode 100644
index 0000000..52f7ade
--- /dev/null
+++ b/libexpat/tests/buildfile
@@ -0,0 +1,4 @@
+# file : tests/buildfile
+# license : MIT; see accompanying COPYING file
+
+./: {*/ -build/}
diff --git a/libexpat/tests/regression/ascii.h b/libexpat/tests/regression/ascii.h
new file mode 120000
index 0000000..0ad0b66
--- /dev/null
+++ b/libexpat/tests/regression/ascii.h
@@ -0,0 +1 @@
+../../../upstream/expat/lib/ascii.h \ No newline at end of file
diff --git a/libexpat/tests/regression/buildfile b/libexpat/tests/regression/buildfile
new file mode 100644
index 0000000..f3ed442
--- /dev/null
+++ b/libexpat/tests/regression/buildfile
@@ -0,0 +1,6 @@
+# file : tests/regression/buildfile
+# license : MIT; see accompanying COPYING file
+
+import libs = libexpat%lib{expat}
+
+exe{driver}: {h c}{**} $libs testscript
diff --git a/libexpat/tests/regression/chardata.c b/libexpat/tests/regression/chardata.c
new file mode 120000
index 0000000..321a5e8
--- /dev/null
+++ b/libexpat/tests/regression/chardata.c
@@ -0,0 +1 @@
+../../../upstream/expat/tests/chardata.c \ No newline at end of file
diff --git a/libexpat/tests/regression/chardata.h b/libexpat/tests/regression/chardata.h
new file mode 120000
index 0000000..fe51175
--- /dev/null
+++ b/libexpat/tests/regression/chardata.h
@@ -0,0 +1 @@
+../../../upstream/expat/tests/chardata.h \ No newline at end of file
diff --git a/libexpat/tests/regression/internal.h b/libexpat/tests/regression/internal.h
new file mode 120000
index 0000000..d23a734
--- /dev/null
+++ b/libexpat/tests/regression/internal.h
@@ -0,0 +1 @@
+../../../upstream/expat/lib/internal.h \ No newline at end of file
diff --git a/libexpat/tests/regression/memcheck.c b/libexpat/tests/regression/memcheck.c
new file mode 120000
index 0000000..c59d54a
--- /dev/null
+++ b/libexpat/tests/regression/memcheck.c
@@ -0,0 +1 @@
+../../../upstream/expat/tests/memcheck.c \ No newline at end of file
diff --git a/libexpat/tests/regression/memcheck.h b/libexpat/tests/regression/memcheck.h
new file mode 120000
index 0000000..3b9545f
--- /dev/null
+++ b/libexpat/tests/regression/memcheck.h
@@ -0,0 +1 @@
+../../../upstream/expat/tests/memcheck.h \ No newline at end of file
diff --git a/libexpat/tests/regression/minicheck.c b/libexpat/tests/regression/minicheck.c
new file mode 120000
index 0000000..abcc94a
--- /dev/null
+++ b/libexpat/tests/regression/minicheck.c
@@ -0,0 +1 @@
+../../../upstream/expat/tests/minicheck.c \ No newline at end of file
diff --git a/libexpat/tests/regression/minicheck.h b/libexpat/tests/regression/minicheck.h
new file mode 120000
index 0000000..c499235
--- /dev/null
+++ b/libexpat/tests/regression/minicheck.h
@@ -0,0 +1 @@
+../../../upstream/expat/tests/minicheck.h \ No newline at end of file
diff --git a/libexpat/tests/regression/runtests.c b/libexpat/tests/regression/runtests.c
new file mode 120000
index 0000000..7753f85
--- /dev/null
+++ b/libexpat/tests/regression/runtests.c
@@ -0,0 +1 @@
+../../../upstream/expat/tests/runtests.c \ No newline at end of file
diff --git a/libexpat/tests/regression/siphash.h b/libexpat/tests/regression/siphash.h
new file mode 120000
index 0000000..af2eb7e
--- /dev/null
+++ b/libexpat/tests/regression/siphash.h
@@ -0,0 +1 @@
+../../../upstream/expat/lib/siphash.h \ No newline at end of file
diff --git a/libexpat/tests/regression/structdata.c b/libexpat/tests/regression/structdata.c
new file mode 120000
index 0000000..69aaeb7
--- /dev/null
+++ b/libexpat/tests/regression/structdata.c
@@ -0,0 +1 @@
+../../../upstream/expat/tests/structdata.c \ No newline at end of file
diff --git a/libexpat/tests/regression/structdata.h b/libexpat/tests/regression/structdata.h
new file mode 120000
index 0000000..f6f572d
--- /dev/null
+++ b/libexpat/tests/regression/structdata.h
@@ -0,0 +1 @@
+../../../upstream/expat/tests/structdata.h \ No newline at end of file
diff --git a/libexpat/tests/regression/testscript b/libexpat/tests/regression/testscript
new file mode 100644
index 0000000..d2af7af
--- /dev/null
+++ b/libexpat/tests/regression/testscript
@@ -0,0 +1,9 @@
+# file : tests/regression/testscript
+# license : MIT; see accompanying COPYING file
+
+: check
+:
+$* >>~/EOE/
+ /Expat version: expat_\d+.\d+.\d+/d
+ /100%: Checks: .+, Failed: 0/
+ EOE