GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Description: a ruby-to-pyc compiler
Clone URL: git://github.com/why/unholy.git
commit  d5266bb310536bd7899e9291bf05ddf1b79827fc
tree    67187c5e507ad5267c9759be21154844c26f1404
parent  d15375b5c542aba81333671d08691bc67153b30b
unholy / tests / all
100755 20 lines (17 sloc) 0.451 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env ruby
$: << "./lib"
require 'unholy'
 
ENV['PYTHONPATH'] = 'python'
 
`rm -rf tests/*.pyc`
Dir["tests/*.rb"].each do |rb|
  unholy(rb, rb + ".pyc")
  expect = File.read(rb).scan(/^# (.+\n)|^#(\n)/).join
  actual = `python #{rb}.pyc`
  puts "#{rb}: #{expect == actual ? "passed" : "FAILED"}"
  unless expect == actual
    puts " expected:"
    puts expect.gsub(/^/, ' ')
    puts " actual:"
    puts actual.gsub(/^/, ' ')
  end
end