From 32c65970263c65022f5278b568c07b63c3d5d64b Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Sun, 15 Jun 2014 15:14:46 +0200 Subject: Merged "read-xml-file" and "read-file" into "read-file" * FunctionReadFile is now able to distinguish between XML files and plain text files ** it selects the appropriate course of action automatically ** reading the file as XML into the DOM or reading it as a string * the current selection criteria is the file extension ** I am thinking about trying to import every file into the DOM and using the result state of that action as selection criteria * Updated README.md and test cases accordingly --- test/common/test.md | 28 ++++++++++++++++++++++++++++ test/common/test.txt | 7 ------- test/common/test.xml | 7 +++++++ test/external_text_formatter/test.md | 28 ---------------------------- test/read_file/reference.xml | 35 ++++++++++++++++++++++++++++------- test/read_file/transformation.xsl | 2 +- test/read_xml_file/transformation.xsl | 2 +- test/transform/transformation.xsl | 2 +- 8 files changed, 66 insertions(+), 45 deletions(-) create mode 100644 test/common/test.md delete mode 100644 test/common/test.txt create mode 100644 test/common/test.xml delete mode 100644 test/external_text_formatter/test.md (limited to 'test') diff --git a/test/common/test.md b/test/common/test.md new file mode 100644 index 0000000..9402e4f --- /dev/null +++ b/test/common/test.md @@ -0,0 +1,28 @@ +# Markdown Test + +__Lorem ipsum__ dolor sit amet, _consectetur_ adipisicing elit, sed do `eiusmod` tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. + +> Duis aute irure dolor in reprehenderit in voluptate +> velit esse cillum dolore eu fugiat nulla pariatur. + +Excepteur sint **occaecat** cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. + +* Test 1 +* Test 2 +* Test 3 +* Test 4 + +Test Test Test + + template < + typename Target, + std::size_t Index = 0, + typename Current = std::tuple<>, + enable_if::value> = 0 + > + inline Target construct( + const xalan::XPathExecutionContext::XObjectArgVectorType&, + Current&& current + ) { + return current; + } diff --git a/test/common/test.txt b/test/common/test.txt deleted file mode 100644 index 046a6ef..0000000 --- a/test/common/test.txt +++ /dev/null @@ -1,7 +0,0 @@ - - - Hello 1 - Hello 2 - Hello 3 - Hello 4 - diff --git a/test/common/test.xml b/test/common/test.xml new file mode 100644 index 0000000..046a6ef --- /dev/null +++ b/test/common/test.xml @@ -0,0 +1,7 @@ + + + Hello 1 + Hello 2 + Hello 3 + Hello 4 + diff --git a/test/external_text_formatter/test.md b/test/external_text_formatter/test.md deleted file mode 100644 index 9402e4f..0000000 --- a/test/external_text_formatter/test.md +++ /dev/null @@ -1,28 +0,0 @@ -# Markdown Test - -__Lorem ipsum__ dolor sit amet, _consectetur_ adipisicing elit, sed do `eiusmod` tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. - -> Duis aute irure dolor in reprehenderit in voluptate -> velit esse cillum dolore eu fugiat nulla pariatur. - -Excepteur sint **occaecat** cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. - -* Test 1 -* Test 2 -* Test 3 -* Test 4 - -Test Test Test - - template < - typename Target, - std::size_t Index = 0, - typename Current = std::tuple<>, - enable_if::value> = 0 - > - inline Target construct( - const xalan::XPathExecutionContext::XObjectArgVectorType&, - Current&& current - ) { - return current; - } diff --git a/test/read_file/reference.xml b/test/read_file/reference.xml index 0bca6f7..4500216 100644 --- a/test/read_file/reference.xml +++ b/test/read_file/reference.xml @@ -1,9 +1,30 @@ -<?xml version="1.0"?> -<tester> - <eintrag>Hello 1</eintrag> - <eintrag>Hello 2</eintrag> - <eintrag>Hello 3</eintrag> - <eintrag>Hello 4</eintrag> -</tester> +# Markdown Test + +__Lorem ipsum__ dolor sit amet, _consectetur_ adipisicing elit, sed do `eiusmod` tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. + +> Duis aute irure dolor in reprehenderit in voluptate +> velit esse cillum dolore eu fugiat nulla pariatur. + +Excepteur sint **occaecat** cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. + +* Test 1 +* Test 2 +* Test 3 +* Test 4 + +Test Test Test + + template < + typename Target, + std::size_t Index = 0, + typename Current = std::tuple<>, + enable_if<Index == std::tuple_size<Target>::value> = 0 + > + inline Target construct( + const xalan::XPathExecutionContext::XObjectArgVectorType&, + Current&& current + ) { + return current; + } diff --git a/test/read_file/transformation.xsl b/test/read_file/transformation.xsl index a968f35..53a815c 100644 --- a/test/read_file/transformation.xsl +++ b/test/read_file/transformation.xsl @@ -10,7 +10,7 @@ - + diff --git a/test/read_xml_file/transformation.xsl b/test/read_xml_file/transformation.xsl index ae54099..98ae358 100644 --- a/test/read_xml_file/transformation.xsl +++ b/test/read_xml_file/transformation.xsl @@ -10,7 +10,7 @@ - + diff --git a/test/transform/transformation.xsl b/test/transform/transformation.xsl index 6bc759d..0c6173d 100644 --- a/test/transform/transformation.xsl +++ b/test/transform/transformation.xsl @@ -40,7 +40,7 @@ -- cgit v1.2.3