Sha256: 472d6d054418346fb07ef4f4794ad32e55a0553de41f135bef89e40d4fe1ec8f

Contents?: true

Size: 1.3 KB

Versions: 48

Compression:

Stored size: 1.3 KB

Contents

$LOAD_PATH.unshift File.expand_path('../lib', File.dirname(__FILE__))
require 'test/unit'
require 'autoproj'
require 'flexmock/test_unit'

class TC_OSDependencies_AptDpkgManager < Test::Unit::TestCase
    def test_status_file_parsing
        file = File.expand_path("apt-dpkg-status", File.dirname(__FILE__))
        mng = Autoproj::PackageManagers::AptDpkgManager.new(file)
        assert mng.installed?('installed-package')
        assert !mng.installed?('noninstalled-package')
    end

    def test_status_file_parsing_last_entry_installed
        file = File.expand_path("apt-dpkg-status.installed-last", File.dirname(__FILE__))
        mng = Autoproj::PackageManagers::AptDpkgManager.new(file)
        assert mng.installed?('installed-package')
    end

    def test_status_file_parsing_last_entry_not_installed
        file = File.expand_path("apt-dpkg-status.noninstalled-last", File.dirname(__FILE__))
        mng = Autoproj::PackageManagers::AptDpkgManager.new(file)
        assert !mng.installed?('noninstalled-package')
    end

    def test_status_file_parsing_not_there_means_not_installed
        file = File.expand_path("apt-dpkg-status.noninstalled-last", File.dirname(__FILE__))
        mng = Autoproj::PackageManagers::AptDpkgManager.new(file)
        assert !mng.installed?('non-existent-package')
    end
end

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
autoproj-1.9.7.rc20 test/package_managers/test_apt_dpkg_manager.rb
autoproj-1.9.7.rc19 test/package_managers/test_apt_dpkg_manager.rb
autoproj-1.9.7.rc18 test/package_managers/test_apt_dpkg_manager.rb
autoproj-1.9.7.rc17 test/package_managers/test_apt_dpkg_manager.rb
autoproj-1.9.7.rc16 test/package_managers/test_apt_dpkg_manager.rb
autoproj-1.9.7.rc15 test/package_managers/test_apt_dpkg_manager.rb
autoproj-1.9.7.rc14 test/package_managers/test_apt_dpkg_manager.rb
autoproj-1.9.7.rc13 test/package_managers/test_apt_dpkg_manager.rb
autoproj-1.9.7.rc12 test/package_managers/test_apt_dpkg_manager.rb
autoproj-1.9.7.rc11 test/package_managers/test_apt_dpkg_manager.rb
autoproj-1.9.7.rc10 test/package_managers/test_apt_dpkg_manager.rb
autoproj-1.9.7.rc9 test/package_managers/test_apt_dpkg_manager.rb
autoproj-1.9.7.rc7 test/package_managers/test_apt_dpkg_manager.rb
autoproj-1.9.7.rc6 test/package_managers/test_apt_dpkg_manager.rb
autoproj-1.9.7.rc5 test/package_managers/test_apt_dpkg_manager.rb
autoproj-1.9.7.rc4 test/package_managers/test_apt_dpkg_manager.rb
autoproj-1.9.7.rc3 test/package_managers/test_apt_dpkg_manager.rb
autoproj-1.9.7.rc2 test/package_managers/test_apt_dpkg_manager.rb
autoproj-1.9.7.rc1 test/package_managers/test_apt_dpkg_manager.rb
autoproj-1.9.6 test/package_managers/test_apt_dpkg_manager.rb