From f78e654a7bc6510537f71013e0e451cfa5b6e6e1 Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Tue, 17 Feb 2015 19:38:28 +0100 Subject: Added very primitive unit tests for include --- testdata/osmlparser/include_child.osml | 4 ++++ testdata/osmlparser/include_recursive.osml | 1 + testdata/osmlparser/include_recursive_root.osml | 10 ++++++++++ testdata/osmlparser/include_root.osml | 20 ++++++++++++++++++++ 4 files changed, 35 insertions(+) create mode 100644 testdata/osmlparser/include_child.osml create mode 100644 testdata/osmlparser/include_recursive.osml create mode 100644 testdata/osmlparser/include_recursive_root.osml create mode 100644 testdata/osmlparser/include_root.osml (limited to 'testdata/osmlparser') diff --git a/testdata/osmlparser/include_child.osml b/testdata/osmlparser/include_child.osml new file mode 100644 index 0000000..1a47dc9 --- /dev/null +++ b/testdata/osmlparser/include_child.osml @@ -0,0 +1,4 @@ +Test +\b +Test + diff --git a/testdata/osmlparser/include_recursive.osml b/testdata/osmlparser/include_recursive.osml new file mode 100644 index 0000000..27eabe0 --- /dev/null +++ b/testdata/osmlparser/include_recursive.osml @@ -0,0 +1 @@ +\include{include_recursive.osml} diff --git a/testdata/osmlparser/include_recursive_root.osml b/testdata/osmlparser/include_recursive_root.osml new file mode 100644 index 0000000..b3e433f --- /dev/null +++ b/testdata/osmlparser/include_recursive_root.osml @@ -0,0 +1,10 @@ +\begin{document} + +\domain#testDomain + \struct#test[isRoot=true] + +\begin{test} +\include{./include_recursive.osml} +\end{test} +\end{document} + diff --git a/testdata/osmlparser/include_root.osml b/testdata/osmlparser/include_root.osml new file mode 100644 index 0000000..1d1d660 --- /dev/null +++ b/testdata/osmlparser/include_root.osml @@ -0,0 +1,20 @@ +\begin{document} + +\domain#testDomain + \struct#test[isRoot=true] + \field + \childRef[ref=a] + \childRef[ref=b] + \struct#a + \field + \childRef[ref=b] + \struct#b[transparent=true] + \primitive[type=string,optional=true] + +\begin{test} +\a +\include{./include_child.osml} +\b +Test +\end{test} +\end{document} -- cgit v1.2.3 From 33f617453e3f64d70c6af05058855d6c12749056 Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Tue, 17 Feb 2015 19:38:42 +0100 Subject: Removed no longer needed "simple_book" test file --- testdata/osmlparser/simple_book.osml | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 testdata/osmlparser/simple_book.osml (limited to 'testdata/osmlparser') diff --git a/testdata/osmlparser/simple_book.osml b/testdata/osmlparser/simple_book.osml deleted file mode 100644 index 21751b9..0000000 --- a/testdata/osmlparser/simple_book.osml +++ /dev/null @@ -1,31 +0,0 @@ -\import[domain]{../osxmlparser/book_domain.osxml} -\import[domain]{../osxmlparser/headings_domain.osxml} - -%\domain#stuff -% \import[typesystem]{../osxmlparser/color.osxml} -% \struct#fancy -% \primitive#bla[type=color] -% \parentRef[ref=book] -% \fieldRef[ref=$default] - -\begin{book} -This might be some introductory text or a dedication. - -\chapter#myFirstChapter{My first chapter} -Here we might have an introduction to the chapter. - -\section#myFirstSection -\heading{A rather curious experiment} -\paragraph{!Here we might find the actual section content. -\heading{test}} - -\section#mySndSection -Here we might find the actual section content. - - -bla - -%\fancy{aquamarine} - -\end{book} - -- cgit v1.2.3