From 11b5df884faf5f5432c8a215f41d4657fc32fdef Mon Sep 17 00:00:00 2001 From: smerten Date: Sun, 25 Apr 2010 10:23:55 +0000 Subject: [PATCH] Added tests. git-svn-id: https://docutils.svn.sourceforge.net/svnroot/docutils/trunk@6313 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- sandbox/rstdiff/global.log | 40 +++++++++++++++ sandbox/rstdiff/studies/coloring.css | 12 +++++ sandbox/rstdiff/tag.log | 2 +- sandbox/rstdiff/tests/simple/expected/section.xml | 60 ++++++++++++++++++++++ sandbox/rstdiff/tests/simple/expected/textOnly.xml | 12 +++-- sandbox/rstdiff/tests/simple/filterunit.cfg | 4 +- sandbox/rstdiff/tests/simple/input/section.new.rst | 24 +++++++++ sandbox/rstdiff/tests/simple/input/section.old.rst | 24 +++++++++ .../rstdiff/tests/simple/input/textOnly.new.rst | 4 +- .../rstdiff/tests/simple/input/textOnly.old.rst | 2 + sandbox/rstdiff/tests/simple/source/section.rst | 43 ++++++++++++++++ sandbox/rstdiff/tests/simple/source/textOnly.rst | 15 ++++++ 12 files changed, 236 insertions(+), 6 deletions(-) create mode 100644 sandbox/rstdiff/studies/coloring.css create mode 100644 sandbox/rstdiff/tests/simple/expected/section.xml create mode 100644 sandbox/rstdiff/tests/simple/input/section.new.rst create mode 100644 sandbox/rstdiff/tests/simple/input/section.old.rst create mode 100644 sandbox/rstdiff/tests/simple/source/section.rst create mode 100644 sandbox/rstdiff/tests/simple/source/textOnly.rst diff --git a/sandbox/rstdiff/global.log b/sandbox/rstdiff/global.log index ea1b430b9..aa26464d5 100644 --- a/sandbox/rstdiff/global.log +++ b/sandbox/rstdiff/global.log @@ -1,4 +1,44 @@ ************************************** +Date: Sun Apr 25 12:14:20 CEST 2010 +Author: stefan +Tag: rstdiff_1_17 + +-------------------------------------- +Update of /home/stefan/vault/sm/rstdiff/studies +In directory rosalu:/home/stefan/free/rstdiff/studies + +Added Files: + coloring.css + +-------------------------------------- +Update of /home/stefan/vault/sm/rstdiff/tests/simple +In directory rosalu:/home/stefan/free/rstdiff/tests/simple + +Modified Files: + filterunit.cfg + +-------------------------------------- +Update of /home/stefan/vault/sm/rstdiff/tests/simple/input +In directory rosalu:/home/stefan/free/rstdiff/tests/simple/input + +Modified Files: + textOnly.new.rst textOnly.old.rst +Added Files: + section.new.rst section.old.rst + +-------------------------------------- +Update of /home/stefan/vault/sm/rstdiff/tests/simple/source +In directory rosalu:/home/stefan/free/rstdiff/tests/simple/source + +Modified Files: + textOnly.rst +Added Files: + section.rst + +-------------------------------------- +Log Message: +Added tests. +************************************** Date: Sat Apr 24 15:19:06 CEST 2010 Author: stefan Tag: rstdiff_1_16 diff --git a/sandbox/rstdiff/studies/coloring.css b/sandbox/rstdiff/studies/coloring.css new file mode 100644 index 000000000..481fce765 --- /dev/null +++ b/sandbox/rstdiff/studies/coloring.css @@ -0,0 +1,12 @@ +.change-added { + background: red } + +.change-deleted { + background: grey } + +.change-replacement { + background: red } + +.change-replaced { + background: grey } + diff --git a/sandbox/rstdiff/tag.log b/sandbox/rstdiff/tag.log index bddde9287..371e02913 100644 --- a/sandbox/rstdiff/tag.log +++ b/sandbox/rstdiff/tag.log @@ -1 +1 @@ -rstdiff_1_16 +rstdiff_1_17 diff --git a/sandbox/rstdiff/tests/simple/expected/section.xml b/sandbox/rstdiff/tests/simple/expected/section.xml new file mode 100644 index 000000000..eafb2f365 --- /dev/null +++ b/sandbox/rstdiff/tests/simple/expected/section.xml @@ -0,0 +1,60 @@ + + + +
+ + First section + + + This is text in the first section. + +
+
+ + Second section + + + This was missing. + +
+
+ + Third section + + + Text in third section. + +
+
+ + Obsolete section + + + Obsolete text. + +
+
+ + Fourth section + + + Number 4! + +
+
+ + Replacable section + + + Replacable text. + +
+
+ + Section replacement + + + Text replacement. + +
+
diff --git a/sandbox/rstdiff/tests/simple/expected/textOnly.xml b/sandbox/rstdiff/tests/simple/expected/textOnly.xml index 33a6f7140..1f5f7ac20 100644 --- a/sandbox/rstdiff/tests/simple/expected/textOnly.xml +++ b/sandbox/rstdiff/tests/simple/expected/textOnly.xml @@ -1,17 +1,23 @@ + + An important addition. + This is some text distributed in a couple of lines. Let's count to - + make things longer: - - end up in three lines: + + fill three lines: one two three four five six seven eight nine ten eleven twelve. + + Some obsolete add-on. + diff --git a/sandbox/rstdiff/tests/simple/filterunit.cfg b/sandbox/rstdiff/tests/simple/filterunit.cfg index 681cba9fd..3f295ecd8 100644 --- a/sandbox/rstdiff/tests/simple/filterunit.cfg +++ b/sandbox/rstdiff/tests/simple/filterunit.cfg @@ -1,6 +1,8 @@ command = ../../rstdiff.py inputExtension = .old.rst +inputExtension = .new.rst +inputCount = 2 expectedExtension = .xml -options = --output-format=xml $< "`old='$<'; echo \${old/.old./.new.}`" +options = --output-format=xml $1< $2< diff --git a/sandbox/rstdiff/tests/simple/input/section.new.rst b/sandbox/rstdiff/tests/simple/input/section.new.rst new file mode 100644 index 000000000..76c90ef8d --- /dev/null +++ b/sandbox/rstdiff/tests/simple/input/section.new.rst @@ -0,0 +1,24 @@ +First section +============= + +This is text in the first section. + +Second section +============== + +This was missing. + +Third section +============= + +Text in third section. + +Fourth section +============== + +Number 4! + +Section replacement +=================== + +Text replacement. diff --git a/sandbox/rstdiff/tests/simple/input/section.old.rst b/sandbox/rstdiff/tests/simple/input/section.old.rst new file mode 100644 index 000000000..63fd8670b --- /dev/null +++ b/sandbox/rstdiff/tests/simple/input/section.old.rst @@ -0,0 +1,24 @@ +First section +============= + +This is text in the first section. + +Third section +============= + +Text in third section. + +Obsolete section +================ + +Obsolete text. + +Fourth section +============== + +Number 4! + +Replacable section +================== + +Replacable text. diff --git a/sandbox/rstdiff/tests/simple/input/textOnly.new.rst b/sandbox/rstdiff/tests/simple/input/textOnly.new.rst index ad5f2ade1..b6006630b 100644 --- a/sandbox/rstdiff/tests/simple/input/textOnly.new.rst +++ b/sandbox/rstdiff/tests/simple/input/textOnly.new.rst @@ -1,3 +1,5 @@ +An important addition. + This is some text distributed in a couple of lines. Let's count to -make things longer: one two three four five six seven eight nine ten +fill three lines: one two three four five six seven eight nine ten eleven twelve. diff --git a/sandbox/rstdiff/tests/simple/input/textOnly.old.rst b/sandbox/rstdiff/tests/simple/input/textOnly.old.rst index ad5f2ade1..975f0a470 100644 --- a/sandbox/rstdiff/tests/simple/input/textOnly.old.rst +++ b/sandbox/rstdiff/tests/simple/input/textOnly.old.rst @@ -1,3 +1,5 @@ This is some text distributed in a couple of lines. Let's count to make things longer: one two three four five six seven eight nine ten eleven twelve. + +Some obsolete add-on. diff --git a/sandbox/rstdiff/tests/simple/source/section.rst b/sandbox/rstdiff/tests/simple/source/section.rst new file mode 100644 index 000000000..6e7e5e58b --- /dev/null +++ b/sandbox/rstdiff/tests/simple/source/section.rst @@ -0,0 +1,43 @@ +First section +============= + +This is text in the first section. + +.. class:: change-added + +Second section +============== + +This was missing. + +Third section +============= + +Text in third section. + +.. class:: change-deleted + +Obsolete section +================ + +Obsolete text. + +Fourth section +============== + +Number 4! + +.. class:: change-replaced + +Replacable section +================== + +Replacable text. + +.. class:: change-replacement + +Section replacement +=================== + +Text replacement. + diff --git a/sandbox/rstdiff/tests/simple/source/textOnly.rst b/sandbox/rstdiff/tests/simple/source/textOnly.rst new file mode 100644 index 000000000..e6b78179e --- /dev/null +++ b/sandbox/rstdiff/tests/simple/source/textOnly.rst @@ -0,0 +1,15 @@ +.. role:: change-replaced +.. role:: change-replacement + +.. class:: change-added + + An important addition. + +This is some text distributed in a couple of lines. Let's count to +:change-replaced:`make things longer:` :change-replacement:`fill three lines:` one two three four five six seven eight nine ten +eleven twelve. + +.. class:: change-deleted + + Some obsolete add-on. + -- 2.11.4.GIT