mirror of https://github.com/aamine/cbc
calculate test dir from $0
git-svn-id: file:///Users/aamine/c/gitwork/public/cbc/trunk@4062 1b9489fe-b721-0410-924e-b54b9192deb8
This commit is contained in:
parent
c39d9fcea5
commit
046327bbae
|
@ -1,12 +1,18 @@
|
|||
require 'pathname'
|
||||
|
||||
def main
|
||||
Dir.chdir Pathname.new($PROGRAM_NAME).realpath.dirname.dirname + 'test'
|
||||
test_sh = File.read('test_cbc.sh')
|
||||
tested = test_sh.scan(/[\$\w\-]+\.cb/).reject {|n| /\$/ =~ n } +
|
||||
test_sh.scan(%r<\./[\w\-]+>).map {|n| File.basename(n) + '.cb' }
|
||||
tested = tested.uniq
|
||||
print_list Dir.glob('*.cb') - tested
|
||||
end
|
||||
|
||||
def print_list(list)
|
||||
list.sort.each do |name|
|
||||
puts name
|
||||
end
|
||||
end
|
||||
|
||||
test_sh = File.read('test_cbc.sh')
|
||||
tested = test_sh.scan(/[\$\w\-]+\.cb/).reject {|n| /\$/ =~ n } +
|
||||
test_sh.scan(%r<\./[\w\-]+>).map {|n| File.basename(n) + '.cb' }
|
||||
tested = tested.uniq
|
||||
|
||||
print_list Dir.glob('*.cb') - tested
|
||||
main
|
||||
|
|
Loading…
Reference in New Issue