Sha256: 7fde4e86ea5b9859fcd383a4b749e5a5ae816b254cd7dcb0abaf67c22be194ad

Contents?: true

Size: 984 Bytes

Versions: 1

Compression:

Stored size: 984 Bytes

Contents

#####################################################################
# tc_msvcrt_io.rb
#
# Test case for the Windows::MSVCRT::IO module.
#####################################################################
require 'windows/msvcrt/io'
require 'minitest/autorun'

class MIOFoo
   include Windows::MSVCRT::IO
end

class TC_Windows_MSVCRT_IO < MiniTest::Unit::TestCase
   def setup
      @foo = MIOFoo.new
   end

   def test_numeric_constants
      assert_not_nil(MIOFoo::S_IFMT)
   end

   def test_method_constants
      assert_not_nil(MIOFoo::Clearerr)
      assert_not_nil(MIOFoo::Close)
      assert_not_nil(MIOFoo::Fclose)
      assert_not_nil(MIOFoo::Fileno)
   end

   def test_clearerr
      assert_respond_to(@foo, :clearerr)
   end

   def test_close
      assert_respond_to(@foo, :close)
   end

   def test_fclose
      assert_respond_to(@foo, :fclose)
   end

   def test_fileno
      assert_respond_to(@foo, :fileno)
   end

   def teardown
      @foo  = nil
   end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
windows-pr-1.2.4 test/tc_msvcrt_io.rb