Sha256: d58ce39f0f8d0822693bb1a8edeba85a212785fb575537185fd4a98c15d8ba2c

Contents?: true

Size: 699 Bytes

Versions: 1

Compression:

Stored size: 699 Bytes

Contents

#! /usr/bin/env ruby
# coding: utf-8

require 'helper'
#require "test/unit"
#require "vasputils/setting.rb"

class TC_Setting < Test::Unit::TestCase
    def setup
        @s = VaspUtils::Setting.new("example/dot.vasputils")
    end

    def test_initialize
        assert_raise(Errno::ENOENT){VaspUtils::Setting.new("not_exist_file")}
    end

    def test_get
        #assert_raise(VaspUtils::Setting::NoEntryError){@s.get("no_entory_key")}
        #assert_equal("/usr/local/calc/potcar/potpaw_PBE.52", @s.get("potcar_dir"))
        assert_raise(VaspUtils::Setting::NoEntryError){@s["no_entory_key"]}
        assert_equal("/home/ippei/opt/vasp/potcar/potpaw_PBE.52", @s["potcar_dir"])
    end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vasputils-0.0.12 test/test_setting.rb