Sha256: 4ad52a2bce74506591451ead7ea326ddc4ce7d5400c2a958dc93ce55e349ce27
Contents?: true
Size: 1.07 KB
Versions: 30
Compression:
Stored size: 1.07 KB
Contents
# -*- coding: utf-8 -*- # # @file # @brief # @author ongaeshi # @date 2012/09/29 require 'milkode/common/plang_detector' require 'test_helper' module Milkode class TestPlangDetector < Test::Unit::TestCase def test_name assert_equal 'ActionScript', PlangDetector.new('Dummy.as').name assert_equal 'C' , PlangDetector.new('a.c').name assert_equal 'C' , PlangDetector.new('a.h').name assert_equal 'C#' , PlangDetector.new('AssemblyInfo.cs').name assert_equal 'C++' , PlangDetector.new('path/to/file.hpp').name assert_equal 'Ruby' , PlangDetector.new('template.rb').name assert_equal 'README' , PlangDetector.new('readme.txt').name assert_equal 'JavaScript' , PlangDetector.new('main.js').name assert_equal 'Visual Studio', PlangDetector.new('hoge.sln').name end def test_unknown assert_equal 'unknown', PlangDetector.new('').name assert_equal 'unknown', PlangDetector.new('.').name assert_equal 'unknown', PlangDetector.new('abcdefg').name end end end
Version data entries
30 entries across 30 versions & 1 rubygems