summaryrefslogtreecommitdiff
path: root/ext/ripper/test/check-scanner-event-coverage.rb
blob: 4de01e35f480a3cc274fbfa6603920b115f041ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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