aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-01-25 17:01:47 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-01-26 03:22:10 +0300
commit8f975a122a280fa8a4d085fad2b6c99e8729ca50 (patch)
tree31ba1749dfa33580e0c19f14ade571ba300bc7f8
parent53c10a574f867c07ac03cadacfcf7f1206379dc7 (diff)
Move roundtrip tests to testscript
-rw-r--r--tests/roundtrip/.gitignore5
-rw-r--r--tests/roundtrip/buildfile25
-rw-r--r--tests/roundtrip/testscript15
3 files changed, 20 insertions, 25 deletions
diff --git a/tests/roundtrip/.gitignore b/tests/roundtrip/.gitignore
deleted file mode 100644
index cee4aa4..0000000
--- a/tests/roundtrip/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-attr-driver
-char-driver
-fup1-driver
-fup2-driver
-ns-driver
diff --git a/tests/roundtrip/buildfile b/tests/roundtrip/buildfile
index 01974c4..ab156e1 100644
--- a/tests/roundtrip/buildfile
+++ b/tests/roundtrip/buildfile
@@ -2,26 +2,11 @@
# copyright : Copyright (c) 2013-2017 Code Synthesis Tools CC
# license : MIT; see accompanying LICENSE file
-# @@ Hack until build2 supports multiple tests. Also remove .gitignore.
-#
-./: exe{attr-driver} exe{char-driver} exe{fup1-driver} exe{fup2-driver} \
- exe{ns-driver}
-
-exe{attr-driver}: cxx{driver}
-exe{attr-driver}: test.roundtrip = attribute.xml
-
-exe{char-driver}: cxx{driver}
-exe{char-driver}: test.roundtrip = characters.xml
-
-exe{fup1-driver}: cxx{driver}
-exe{fup1-driver}: test.roundtrip = followup-1.xml
-
-exe{fup2-driver}: cxx{driver}
-exe{fup2-driver}: test.roundtrip = followup-2.xml
+import libs = libstudxml%lib{studxml}
-exe{ns-driver}: cxx{driver}
-exe{ns-driver}: test.roundtrip = namespace.xml
+exe{driver}: cxx{driver} $libs test{testscript}
-import libs = libstudxml%lib{studxml}
+define xml: file
+xml{*}: extension = xml
-exe{attr-driver char-driver fup1-driver fup2-driver ns-driver}: $libs
+./: exe{driver} xml{attribute characters followup-1 followup-2 namespace}
diff --git a/tests/roundtrip/testscript b/tests/roundtrip/testscript
new file mode 100644
index 0000000..0cb18a2
--- /dev/null
+++ b/tests/roundtrip/testscript
@@ -0,0 +1,15 @@
+# file : tests/roundtrip/testscript
+# copyright : Copyright (c) 2013-2017 Code Synthesis Tools CC
+# license : MIT; see accompanying LICENSE file
+
+# We are using external files for parsing/matching not to break make-based
+# tests.
+#
+# @@ Use here-documents when (if) we fully move the project to build2.
+#
+
+$* $src_base/attribute.xml >>>$src_base/attribute.xml : attribute
+$* $src_base/characters.xml >>>$src_base/characters.xml : characters
+$* $src_base/followup-1.xml >>>$src_base/followup-1.xml : followup-1
+$* $src_base/followup-2.xml >>>$src_base/followup-2.xml : followup-2
+$* $src_base/namespace.xml >>>$src_base/namespace.xml : namespace