Initial Revision
[ohcount] / test / unit / awk_test.rb
1 require File.dirname(__FILE__) + '/../test_helper'
2
3 class AwkTest < LingoTest
4         def test_comment
5                 lb = [Ohcount::LanguageBreakdown.new("awk", "", "#comment", 0)]
6                 assert_equal lb, Ohcount::parse(" #comment", "awk")
7         end
8
9         def test_double_slash
10                 lb = [Ohcount::LanguageBreakdown.new("awk", "\"\\\\\"\n", "#comment", 0)]
11                 # awk doesn't recognize backslash escaping of double quote...weird
12                 assert_equal lb, Ohcount::parse("\"\\\\\"\n#comment", "awk")
13         end
14
15         def test_comprehensive
16                 verify_parse("awk1.awk")
17         end
18 end