From 5246bada80d61b001c18cb334774872e4cd18579 Mon Sep 17 00:00:00 2001 From: Jacques Distler Date: Sun, 4 Feb 2007 16:30:29 -0600 Subject: [PATCH] Added some more xhtmldiff unit tests. --- test/unit/diff_test.rb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/test/unit/diff_test.rb b/test/unit/diff_test.rb index ccb2abcc..c452486b 100755 --- a/test/unit/diff_test.rb +++ b/test/unit/diff_test.rb @@ -42,6 +42,15 @@ class DiffTest < Test::Unit::TestCase diff(a, b)) end + def test_html_diff_deleting_a_paragraph + a = "

this is a paragraph

\n

this is a second paragraph

\n

this is a third paragraph

" + b = "

this is a paragraph

\n

this is a third paragraph

" + assert_equal( + "

this is a paragraph

\n

this is a second paragraph

" + + "\n

this is a third paragraph

", + diff(a, b)) + end + def test_split_paragraph_into_two a = "

foo bar

" b = "

foo

bar

" @@ -87,7 +96,7 @@ class DiffTest < Test::Unit::TestCase def test_diff_for_tag_change a = "x" b = "x" - # FIXME sad, but true - this case produces an invalid XML. If handle this you can, strong your foo is. + # FIXME. xhtmldiff fails to detect any change here assert_equal "
xx
", diff(a, b) end