summaryrefslogtreecommitdiff
path: root/libs/cairo-1.16.0/test/make-cairo-test-constructors.sh
diff options
context:
space:
mode:
Diffstat (limited to 'libs/cairo-1.16.0/test/make-cairo-test-constructors.sh')
-rw-r--r--libs/cairo-1.16.0/test/make-cairo-test-constructors.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/libs/cairo-1.16.0/test/make-cairo-test-constructors.sh b/libs/cairo-1.16.0/test/make-cairo-test-constructors.sh
new file mode 100644
index 0000000..a03d61c
--- /dev/null
+++ b/libs/cairo-1.16.0/test/make-cairo-test-constructors.sh
@@ -0,0 +1,31 @@
+#! /bin/sh
+
+set -e
+
+if test $# -eq 0; then
+ echo "$0: no input files." >&2
+ exit 1
+fi
+
+cat <<HERE
+/* WARNING: Autogenerated file - see $0! */
+
+#include "cairo-test-private.h"
+
+void _cairo_test_runner_register_tests (void);
+
+HERE
+
+cat "$@" | sed '/^CAIRO_TEST/!d; s/CAIRO_TEST.*(\(.*\),.*/extern void _register_\1 (void);/'
+cat <<HERE
+
+void
+_cairo_test_runner_register_tests (void)
+{
+HERE
+
+cat "$@" | sed '/^CAIRO_TEST/!d; s/CAIRO_TEST.*(\(.*\),.*/ _register_\1 ();/'
+
+echo "}"
+
+