Sha256: 7ff1f3fbe05839958f46ad2c8e3fe8bda557b45b1086348da1179c64be876b13

Contents?: true

Size: 611 Bytes

Versions: 10

Compression:

Stored size: 611 Bytes

Contents

require 'livetext'
require 'formatline'

  def red(str)
    "" + str + ""
  end

input = ARGV.first || "test/data/lines.txt"
data = File.readlines(input)

data.each_slice(4) do |lines|
  title, input, expected, blank = *lines
  input.chomp!
  expected.chomp!
  expected = eval(expected) if expected[0] == "/"
  
  puts "-----------------------------"
  print "Test:      #{title}"

  actual = FormatLine.parse!(input)
  next if expected === actual

  puts "Input:     #{input}"
  puts "  #{red('FAIL Expected: ')} #{expected.inspect}"
  puts "  #{red('     Actual  : ')} #{actual.inspect}"
  puts 
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
livetext-0.9.10 test/testlines.rb
livetext-0.9.09 test/testlines.rb
livetext-0.9.08 test/testlines.rb
livetext-0.9.07 test/testlines.rb
livetext-0.9.06 test/testlines.rb
livetext-0.9.05 test/testlines.rb
livetext-0.9.04 test/testlines.rb
livetext-0.9.03 test/testlines.rb
livetext-0.9.02 test/testlines.rb
livetext-0.9.01 test/testlines.rb