Skip to content
This repository
tree: c50a7628d8
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 32 lines (25 sloc) 0.812 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
#!/usr/bin/env ruby

$:.insert(0, File.expand_path(File.dirname(File.expand_path(__FILE__)) + "/../lib/"))

require 'test/unit'
require 'slackware/log'

def log(msg)
    Slackware::Log.instance.info(File.basename(__FILE__)) { msg }
end

class TestVersion < Test::Unit::TestCase
  def setup
    @root_prev = ENV["ROOT"]
    ENV["ROOT"] = File.join(File.dirname(File.expand_path(__FILE__)), 'samples')
    log( "ROOT: #{ENV["ROOT"]} ")
  end
  def teardown
    ENV["ROOT"] = @root_prev
  end

  def test_version
    # sticking it here, so that the variable is setup *after* the ROOT environment is declared
    require 'slackware/version'
    a = Slackware::SLACKWARE_VERSION
    log(a)
    assert_equal("13.37.314159", a, "the version of slackware deduced, does not match")
  end
end

# vim : set sw=2 sts=2 et :
Something went wrong with that request. Please try again.