Sha256: 8f1bf3faf3a87497efdefc3d889fd079ffb9aa1d07c6986ac2a368c59f6bca75

Contents?: true

Size: 699 Bytes

Versions: 17

Compression:

Stored size: 699 Bytes

Contents

require 'spec_helper'

describe "samples/extradata.png" do
  subject{ cli(sample("extradata.png")) }
  it { should include("foobar1") }
  it { should include("foobar2") }
  it { should include("foobar3") }

  describe "--extract" do
    before do
      @out = subject
    end
    it "should extract all" do
      keys = []
      @out.split(/[\r\n]+/).each do |line|
        if line[/foobar\d/]
          keys << line.split.first
        end
      end
      keys.size.should == 3
      r = cli(sample("extradata.png"), *keys.map{|k| "--extract #{k}"} )
      r.should include("foobar1")
      r.should include("foobar2")
      r.should include("foobar3")
      r.size.should == 7*3
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
zsteg-0.2.13 spec/extradata_spec.rb
zsteg-0.2.12 spec/extradata_spec.rb
zsteg-0.2.11 spec/extradata_spec.rb
zsteg-0.2.10 spec/extradata_spec.rb
zsteg-0.2.9 spec/extradata_spec.rb
zsteg-0.2.8 spec/extradata_spec.rb
zsteg-0.2.7 spec/extradata_spec.rb
zsteg-0.2.6 spec/extradata_spec.rb
zsteg-0.2.5 spec/extradata_spec.rb
zsteg-0.2.4 spec/extradata_spec.rb
zsteg-0.2.3 spec/extradata_spec.rb
zsteg-0.2.2 spec/extradata_spec.rb
zsteg-0.2.1 spec/extradata_spec.rb
zsteg-0.2.0 spec/extradata_spec.rb
zsteg-0.1.2 spec/extradata_spec.rb
zsteg-0.1.1 spec/extradata_spec.rb
zsteg-0.1.0 spec/extradata_spec.rb