1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/ext/ripper/test/check-scanner-event-coverage.rb

19 lines
308 B
Ruby
Raw Normal View History

def main
not_tested = eventids() - tested_ids()
unless not_tested.empty?
puts not_tested
exit 1
end
exit 0
end
def eventids
File.read('eventids2.c').scan(/on__(\w+)/).flatten.uniq
end
def tested_ids
File.read('test/test_scanner_events.rb').scan(/def test_(\S+)/).flatten.uniq
end
main