File: lzw_spec.rb

package info (click to toggle)
ruby-pdf-reader 1.3.3-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 12,908 kB
  • ctags: 569
  • sloc: ruby: 8,330; makefile: 10
file content (13 lines) | stat: -rw-r--r-- 319 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
# coding: utf-8

require File.dirname(__FILE__) + "/spec_helper"

describe PDF::Reader::LZW do
  it "should correctly decode a lzw compress string" do
    content = %w{ 80 0B 60 50 22 0C 0C 85 01 }.map { |byte|
      byte.to_i(16)
    }.pack("C*")

    PDF::Reader::LZW.decode(content).should == '-----A---B'
  end
end