Sha256: ad37cba49c925a9a9920c2337f186ccc0524af0fe032ae7d746930016d9d2645

Contents?: true

Size: 724 Bytes

Versions: 16

Compression:

Stored size: 724 Bytes

Contents

#!/usr/bin/env ruby
require 'test/unit'
require 'rubygems'; require 'require_relative'
require_relative './mock-helper'
require_relative '../../processor/command/exit'

class TestCommandExit < Test::Unit::TestCase
  include MockUnitHelper
  def setup
    @name      = File.basename(__FILE__, '.rb').split(/-/)[2]
    common_setup(@name)
  end

  def test_basic
    pid = fork { @cmd.run([@name, '10']) }
    Process.wait
    assert_equal(10, $?.exitstatus)
    pid = fork { @cmd.run([@name]) }
    Process.wait
    assert_equal(0, $?.exitstatus)
    # FIXME: should test that finalization routines get run;
    # should test 'confirm' gets run; and should test that
    # 'unconditional' is handled correctly.
  end
  

end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
rbx-trepanning-0.2.1-universal-rubinius-2.0 test/unit/test-cmd-exit.rb
rbx-trepanning-0.2.1-universal-rubinius-1.2 test/unit/test-cmd-exit.rb
rbx-trepanning-0.2.0-universal-rubinius-2.0 test/unit/test-cmd-exit.rb
rb8-trepanning-0.1.6 test/unit/test-cmd-exit.rb
rb8-trepanning-0.1.5 test/unit/test-cmd-exit.rb
rbx-trepanning-0.1.0-universal-rubinius-1.2 test/unit/test-cmd-exit.rb
rb8-trepanning-0.1.4 test/unit/test-cmd-exit.rb
rb8-trepanning-0.1.3 test/unit/test-cmd-exit.rb
rb8-trepanning-0.1.3-universal-ruby-1.9.2 test/unit/test-cmd-exit.rb
rb8-trepanning-0.1.3-universal-ruby-1.8.7 test/unit/test-cmd-exit.rb
rbx-trepanning-0.0.8-universal-rubinius-1.2 test/unit/test-cmd-exit.rb
rbx-trepanning-0.0.7-universal-rubinius-1.2 test/unit/test-cmd-exit.rb
rbx-trepanning-0.0.6-universal-rubinius-1.2 test/unit/test-cmd-exit.rb
rbx-trepanning-0.0.5-universal-rubinius-1.2.1 test/unit/test-cmd-exit.rb
rbx-trepanning-0.0.4-universal-rubinius-1.2 test/unit/test-cmd-exit.rb
rbx-trepanning-0.0.3-universal-rubinius-1.2 test/unit/test-cmd-exit.rb