Unit tests for Literate Haskell
[ohcount] / test / unit / pike_test.rb
1 require File.dirname(__FILE__) + '/../test_helper'
2
3 class Ohcount::PikeTest < Ohcount::Test
4         def test_comments
5                 lb = [Ohcount::LanguageBreakdown.new("pike", "", "//comment", 0)]
6                 assert_equal lb, Ohcount::parse(" //comment", "pike")
7         end
8
9         def test_comments2
10                 lb = [Ohcount::LanguageBreakdown.new("pike", "", "/*comment*/", 0)]
11                 assert_equal lb, Ohcount::parse(" /*comment*/", "pike")
12         end
13
14         def test_comprehensive
15                 verify_parse("pike1.pike")
16         end
17
18         def test_comprehensive_pmod
19                 verify_parse("pike2.pmod")
20         end
21 end