Sha256: 98f206fff7670c08d6f8c455e9e76e84f0b195e078c03a75f7860ec72c5becff

Contents?: true

Size: 671 Bytes

Versions: 93

Compression:

Stored size: 671 Bytes

Contents

# -*- ruby encoding: utf-8 -*-

require 'spec_helper'

describe "Diff::LCS Issues" do
  include Diff::LCS::SpecHelper::Matchers

  it "should not fail to provide a simple patchset (issue 1)" do
    s1, s2 = *%W(aX bXaX)
    correct_forward_diff = [
      [ [ '+', 0, 'b' ],
        [ '+', 1, 'X' ] ],
    ]

    diff_s1_s2 = Diff::LCS.diff(s1, s2)
    change_diff(correct_forward_diff).should == diff_s1_s2
    expect do
      Diff::LCS.patch(s1, diff_s1_s2).should == s2
    end.to_not raise_error(RuntimeError, /provided patchset/)
    expect do
      Diff::LCS.patch(s2, diff_s1_s2).should == s1
    end.to_not raise_error(RuntimeError, /provided patchset/)
  end
end

Version data entries

93 entries across 89 versions & 36 rubygems

Version Path
vagrant-unbundled-1.9.1.1 vendor/bundle/ruby/2.4.0/gems/diff-lcs-1.2.5/spec/issues_spec.rb
abaci-0.3.0 vendor/bundle/gems/diff-lcs-1.2.5/spec/issues_spec.rb
ivanvc-logstash-input-s3-3.1.1.4 vendor/local/gems/diff-lcs-1.2.5/spec/issues_spec.rb
ivanvc-logstash-input-s3-3.1.1.3 vendor/local/gems/diff-lcs-1.2.5/spec/issues_spec.rb
ivanvc-logstash-input-s3-3.1.1.2 vendor/local/gems/diff-lcs-1.2.5/spec/issues_spec.rb
gameboard-3.1.0 vendor/bundle/ruby/2.3.0/gems/diff-lcs-1.2.5/spec/issues_spec.rb
gameboard-3.0.0 vendor/bundle/ruby/2.3.0/gems/diff-lcs-1.2.5/spec/issues_spec.rb
cvss-suite-1.0.8 vendor/cache/ruby/2.2.0/gems/diff-lcs-1.2.5/spec/issues_spec.rb
tdiary-5.0.2 vendor/bundle/gems/diff-lcs-1.2.5/spec/issues_spec.rb
logstash-filter-delta-1.1.0 vendor/bundle/jruby/2.2.0/gems/diff-lcs-1.2.5/spec/issues_spec.rb
logstash-filter-delta-1.0.1 vendor/bundle/jruby/2.2.0/gems/diff-lcs-1.2.5/spec/issues_spec.rb
logstash-filter-base64-1.0.4 vendor/bundle/jruby/2.2.0/gems/diff-lcs-1.2.5/spec/issues_spec.rb
logstash-filter-base64-1.0.3 vendor/bundle/jruby/2.2.0/gems/diff-lcs-1.2.5/spec/issues_spec.rb
logstash-filter-delta-1.0.0 vendor/bundle/jruby/2.2.0/gems/diff-lcs-1.2.5/spec/issues_spec.rb
logstash-filter-base64-1.0.2 vendor/bundle/jruby/2.3.0/gems/diff-lcs-1.2.5/spec/issues_spec.rb
logstash-filter-base64-1.0.1 vendor/bundle/jruby/2.3.0/gems/diff-lcs-1.2.5/spec/issues_spec.rb
logstash-filter-base64-1.0.0 vendor/bundle/jruby/2.3.0/gems/diff-lcs-1.2.5/spec/issues_spec.rb
vagrant-unbundled-1.8.5.2 vendor/bundle/ruby/2.3.0/gems/diff-lcs-1.2.5/spec/issues_spec.rb
vagrant-unbundled-1.8.5.1 vendor/bundle/ruby/2.3.0/gems/diff-lcs-1.2.5/spec/issues_spec.rb
vagrant-unbundled-1.8.4.2 vendor/bundle/ruby/2.3.0/gems/diff-lcs-1.2.5/spec/issues_spec.rb