From b593ecdd3486f4541c0bcd68beec9146d78813a2 Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Wed, 1 Apr 2015 23:34:18 +0200 Subject: Add first integration tests * "poem" contains a nice use case for user defined syntax that still needs to be implemented (indent and dedent as open/close tag) * "simple_short_token" triggers a non-deterministic bug that is not caught by valgrind * "wikilike" contains various user defined syntax tests as well as the not yet implemented per-field user defined syntax --- .../integration/user_defined_syntax/poem.in.osml | 65 ++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 testdata/integration/user_defined_syntax/poem.in.osml (limited to 'testdata/integration/user_defined_syntax/poem.in.osml') diff --git a/testdata/integration/user_defined_syntax/poem.in.osml b/testdata/integration/user_defined_syntax/poem.in.osml new file mode 100644 index 0000000..f0deaba --- /dev/null +++ b/testdata/integration/user_defined_syntax/poem.in.osml @@ -0,0 +1,65 @@ +\begin{document} + +\ontology#poem{ + \struct#poem[root=true] + \field + \childRef[ref=stanza] + \struct#stanza[transparent=true] + \syntax + \close{\paragraph} + \field + \childRef[ref=line] + \childRef[ref=indentation] + \struct#line[transparent=true] + \syntax + \close{\newline} + \primitive[type=string] + \struct#indentation + \syntax +% TODO: Fix this +% \open{\indent} +% \close{\dedent} + \field + \childRef[ref=line] + \childRef[ref=indentation] +} + +% To Autumn by John Keats (1820) +% http://en.wikisource.org/wiki/Keats;_poems_published_in_1820/To_Autumn +\begin{poem} +Among the river sallows, borne aloft + Or sinking as the light wind lives or dies; +And full-grown lambs loud bleat from hilly bourn; + Hedge-crickets sing; and now with treble soft + The red-breast whistles from a garden-croft; + And gathering swallows twitter in the skies. +Season of mists and mellow fruitfulness, + Close bosom-friend of the maturing sun; +Conspiring with him how to load and bless + With fruit the vines that round the thatch-eves run; +To bend with apples the moss'd cottage-trees, + And fill all fruit with ripeness to the core; + To swell the gourd, and plump the hazel shells +With a sweet kernel; to set budding more, + And still more, later flowers for the bees, + Until they think warm days will never cease, + For Summer has o'er-brimm'd their clammy cells. + +Who hath not seen thee oft amid thy store? + Sometimes whoever seeks abroad may find +Thee sitting careless on a granary floor, + Thy hair soft-lifted by the winnowing wind; +Or on a half-reap'd furrow sound asleep, + Drows'd with the fume of poppies, while thy hook + Spares the next swath and all its twined flowers: +And sometimes like a gleaner thou dost keep + Steady thy laden head across a brook; + Or by a cyder-press, with patient look, + Thou watchest the last oozings hours by hours. + +Where are the songs of Spring? Ay, where are they? + Think not of them, thou hast thy music too,— +While barred clouds bloom the soft-dying day, + And touch the stubble-plains with rosy hue; +\end{poem} +\end{document} -- cgit v1.2.3