Sha256: 17fcef7b15494b3f896567ade542d807c5772cf5acd2c02505aef9e1da96c266

Contents?: true

Size: 846 Bytes

Versions: 5

Compression:

Stored size: 846 Bytes

Contents

# encoding: utf-8

require 'rake'
require 'test/unit'
require 'rake/delphi/envvariables'
require 'rake/helpers/unittest'

class TestEnvVariables < Test::Unit::TestCase

    def setup
        ENV['BDS_PLATFORM'] = 'BDS platform'
        ENV['BDS_PLATFORM_CASE'] = 'BDS platform case'
    end

    def test_expands
        env_vars = Rake::Delphi::EnvVariables.new(nil, 'c:/delphi directory/')
        assert_equal('c:/delphi directory', env_vars['BDS'])
        assert_equal('c:/delphi directory/Lib', env_vars['BDSLIB'])
        assert_equal('Platform: BDS platform', env_vars.expand('Platform: $(BDS_PLATFORM)'))
        assert_equal('Platform: BDS platform case', env_vars.expand('Platform: $(bds_platform_case)'))
        assert_equal('Env: $(BDS_NON_EXISTANT)', env_vars.expand('Env: $(BDS_NON_EXISTANT)'))
    end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rake-delphi-0.0.9 test/test-envvariables.rb
rake-delphi-0.0.8 test/test-envvariables.rb
rake-delphi-0.0.7 test/test-envvariables.rb
rake-delphi-0.0.6 test/test-envvariables.rb
rake-delphi-0.0.5 test/test-envvariables.rb