File: count.rb

package info (click to toggle)
coderay 1.1.3-8
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,368 kB
  • sloc: ruby: 9,987; makefile: 14; sh: 4; python: 1
file content (15 lines) | stat: -rw-r--r-- 274 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
require 'test/unit'
require 'coderay'

class CountTest < Test::Unit::TestCase
  
  def test_count
    tokens = CodeRay.scan <<-RUBY.strip, :ruby
#!/usr/bin/env ruby
# a minimal Ruby program
puts "Hello world!"
    RUBY
    assert_equal 11, tokens.encode(:count)
  end
  
end