summaryrefslogtreecommitdiff
path: root/spec/diff_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/diff_spec.rb')
-rw-r--r--spec/diff_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/diff_spec.rb b/spec/diff_spec.rb
index e82ab3d..95d7b40 100644
--- a/spec/diff_spec.rb
+++ b/spec/diff_spec.rb
@@ -31,6 +31,12 @@ describe "Diff::LCS.diff" do
change_diff(correct_diff).should == diff
end
+ it "should correctly diff 'xx' and 'xaxb'" do
+ left = 'xx'
+ right = 'xaxb'
+ Diff::LCS.patch(left, Diff::LCS.diff(left, right)).should == right
+ end
+
it "should return an empty diff with (hello, hello)" do
Diff::LCS.diff(hello, hello).should == []
end