Sha256: 48b42ef0631f10b6586beedcc39d05fda5c41beb4e6b5ccff43230eaa24fa214

Contents?: true

Size: 1.2 KB

Versions: 1

Compression:

Stored size: 1.2 KB

Contents

# tc_config.rb
# Copyright (C) Rémi Even 2016
#
# This file is part of Xolti.
#
# Xolti is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Xolti is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Xolti. If not, see <http://www.gnu.org/licenses/>.
require "test/unit"

require_relative "../lib/config"

class TestConfig < Test::Unit::TestCase

	def test_default_comment
		sut = XoltiConfig.new({
			"project_info" => {
				"project_name" => "Xolti",
				"author" => "Rémi Even"
			},
			"template" => "Header",
			"comment" => {
				"tex" => "% "
			}
		})
		assert_equal(sut.get_comment("someUnknownExtension"), ["/*", " * ", " */"])
		assert_equal(sut.get_comment("rb"), "# ")
		assert_equal(sut.get_comment("tex"), "% ")
		assert_equal(sut.get_comment(".tex"), "% ")
	end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
xolti-0.2.0 test/tc_config.rb