Changeset 1fabcc0a1d1b2376339c3d8d4f052beef910fcb3
- Timestamp:
- 06/26/2008 04:52:28 PM (6 months ago)
- git-parent:
[676dc44cb59a8fb684940300c42aea812eab4fe5], [873d0fee5838f3c7b9c8c36a564fb005c5909106]
- Files:
-
- Rakefile (modified) (1 diff)
- bin/ohcount (modified) (1 diff)
- lib/ohcount/detector.rb (modified) (3 diffs)
- lib/ohcount/sloc_info.rb (modified) (2 diffs)
- test/detect_files/configure (added)
- test/detect_files/foo.exheres-0 (added)
- test/expected_dir/foo.exheres-0/exheres/blanks (added)
- test/expected_dir/foo.exheres-0/exheres/code (added)
- test/expected_dir/foo.exheres-0/exheres/comment (added)
- test/expected_dir/vhdl1.vhdl/vhdl/blanks (added)
- test/expected_dir/vhdl1.vhdl/vhdl/code (added)
- test/expected_dir/vhdl1.vhdl/vhdl/comment (added)
- test/src_dir/foo.exheres-0 (added)
- test/src_dir/vhdl1.vhdl (added)
- test/unit/detector_test.rb (modified) (1 diff)
- test/unit/exheres_test.rb (added)
- test/unit/vhdl_test.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
Rakefile
radfc63c r1fabcc0 100 100 101 101 Rake::TestTask.new :ohcount_unit_tests => ARCH_DL do |t| 102 puts File.dirname(__FILE__) + '/test/unit/*_test.rb'102 # puts File.dirname(__FILE__) + '/test/unit/*_test.rb' 103 103 t.test_files = FileList[File.dirname(__FILE__) + '/test/unit/*_test.rb'] 104 t.verbose = true104 # t.verbose = true 105 105 end 106 106 bin/ohcount
rab15090 r1fabcc0 258 258 if comment+code > 0 259 259 printf(" %9.1f%%", comment.to_f / (comment+code).to_f * 100.0) 260 else 261 printf(" 0.0%"); 260 262 end 261 263 printf(" %10d", blank) lib/ohcount/detector.rb
r048a0f2 r1fabcc0 130 130 '.kdebuild-1'=> "ebuild", 131 131 '.erl' => "erlang", 132 '.exheres-0' => "exheres", 133 '.exlib' => "exheres", 132 134 '.f' => :disambiguate_fortran, 133 135 '.ftn' => :disambiguate_fortran, … … 174 176 '.php4' => "php", 175 177 '.php5' => "php", 178 '.p6' => "perl", 176 179 '.pl' => "perl", 177 180 '.pm' => "perl", … … 222 225 'Makefile.am' => 'automake', 223 226 'configure.in' => 'autoconf', 224 'configure.ac' => 'autoconf' 227 'configure.ac' => 'autoconf', 228 'configure' => 'autoconf' 225 229 } 226 230 lib/ohcount/sloc_info.rb
r23ee87d r5bdc29e 58 58 'emacslisp' => {:nice_name => 'Emacs Lisp' , :category => 0}, 59 59 'erlang' => {:nice_name => 'Erlang' , :category => 0}, 60 'exheres' => {:nice_name => 'Exheres' , :category => 0}, 60 61 'fortranfixed' => {:nice_name => 'Fortran (Fixed-format)', :category => 0}, 61 62 'fortranfree' => {:nice_name => 'Fortran (Free-format)', :category => 0}, … … 86 87 'tcl' => {:nice_name => 'Tcl' , :category => 0}, 87 88 'vala' => {:nice_name => 'Vala' , :category => 0}, 89 'vhdl' => {:nice_name => 'VHDL' , :category => 0}, 88 90 'visualbasic' => {:nice_name => 'Visual Basic' , :category => 0}, 89 91 'vim' => {:nice_name => 'Vim Script' , :category => 0}, test/unit/detector_test.rb
r7cf8da8 r53b5981 59 59 assert_equal "ebuild", do_detect("foo.ebuild") 60 60 assert_equal "ebuild", do_detect("foo.eclass") 61 assert_equal "exheres", do_detect("foo.exheres-0") 62 assert_equal "exheres", do_detect("foo.exlib") 61 63 end 62 64 test/unit/vhdl_test.rb
rfcb57d7 r1fabcc0 2 2 3 3 class Ohcount::VHDLTest < Ohcount::Test 4 5 4 def test_comment 6 5 lb = [Ohcount::LanguageBreakdown.new("vhdl", "", "-- comment", 0)]