Sha256: d6f13b5507149558290f4421be73ca96aeacfdf823c38a3dee54b380256dad71

Contents?: true

Size: 523 Bytes

Versions: 2

Compression:

Stored size: 523 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

2 entries across 2 versions & 1 rubygems

Version Path
tefil-0.1.1 test/test_percentpacker.rb
tefil-0.1.0 test/test_percentpacker.rb