Sha256: ce57395a5567076d41142e63a54ea1890fe17f6490ed131ce4f6fe73e59c1011

Contents?: true

Size: 524 Bytes

Versions: 4

Compression:

Stored size: 524 Bytes

Contents

#! /usr/bin/env ruby
# coding: utf-8

require "helper"
require "stringio"

class Tefil::PercentPacker
  public :process_stream
end

class TC_PercentPacker < Test::Unit::TestCase
  def setup
    @pp00 = Tefil::PercentPacker.new()
  end

  def test_process_stream
    # stdin -> stdout
    $stdin = StringIO.new
    $stdin.puts '%E3%83%86%E3%82%B9%E3%83%88'
    $stdin.rewind
    #str = capture_stdout{}
    result = capture_stdout{ @pp00.filter([])}
    correct = "ใƒ†ใ‚นใƒˆ\n"
    assert_equal(correct, result)
  end
end



Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
tefil-0.1.5 test/test_percentpacker.rb
tefil-0.1.4 test/test_percentpacker.rb
tefil-0.1.3 test/test_percentpacker.rb
tefil-0.1.2 test/test_percentpacker.rb