Sha256: 8366c8d926ebec2332225032eac4db44107728e0f9b0c875aa25adaae65ab375

Contents?: true

Size: 607 Bytes

Versions: 125

Compression:

Stored size: 607 Bytes

Contents

#!/usr/bin/env ruby

require 'term/ansicolor'

class String
  include Term::ANSIColor
end

file = ARGV.shift
name = ARGV.shift
ENV['RUBYOPT'] = "#{ENV['RUBYOPT']} -Iext:lib:test:tests"

STDOUT.sync = true
begin
  output =
    if name
      IO.popen("testrb -p '' -n #{name} #{file}", 'r')
    else
      IO.popen("testrb -p '' #{file}", 'r')
    end
  until output.eof?
    line = output.readline.uncolored
    new_line = line.chomp
    if new_line.sub!(%r(^(?:\s|[\/\[])*([^:]+):(\d+):(.*))) { "#$1:#$2:#$3" }
      puts new_line
    else
      puts line
    end
  end
ensure
  output and output.close
end

Version data entries

125 entries across 125 versions & 1 rubygems

Version Path
utils-0.22.1 bin/errf
utils-0.22.0 bin/errf
utils-0.21.2 bin/errf
utils-0.21.1 bin/errf
utils-0.21.0 bin/errf
utils-0.20.0 bin/errf
utils-0.19.0 bin/errf
utils-0.18.1 bin/errf
utils-0.18.0 bin/errf
utils-0.17.0 bin/errf
utils-0.16.0 bin/errf
utils-0.15.1 bin/errf
utils-0.15.0 bin/errf
utils-0.14.0 bin/errf
utils-0.13.0 bin/errf
utils-0.12.0 bin/errf
utils-0.11.0 bin/errf
utils-0.10.1 bin/errf
utils-0.10.0 bin/errf
utils-0.9.0 bin/errf