Unit tests for Literate Haskell
[ohcount] / test / unit / dcl_test.rb
1 require File.dirname(__FILE__) + '/../test_helper'
2
3 class Ohcount::DclTest < Ohcount::Test
4         def test_comment
5                 lb = [Ohcount::LanguageBreakdown.new("dcl", "", "$!comment", 0)]
6                 assert_equal lb, Ohcount::parse("$!comment", "dcl")
7         end
8
9         def test_code
10                 lb= [Ohcount::LanguageBreakdown.new("dcl", "$code", "", 0)]
11                 assert_equal lb, Ohcount::parse("$code", "dcl")
12         end
13
14         def test_blank
15                 lb=[Ohcount::LanguageBreakdown.new("dcl", "", "", 1)]
16                 assert_equal lb, Ohcount::parse("$ ", "dcl")
17         end
18
19         def test_input_line
20                 lb=[Ohcount::LanguageBreakdown.new("dcl", "input", "", 0)]
21                 assert_equal lb, Ohcount::parse("input", "dcl")
22         end
23
24
25         def test_comprehensive
26                 verify_parse("dcl.com")
27         end
28 end