Sha256: d57515569f27b9bb8a41ea36c9b0ed31eb158981a207dac1521afe2b2a34faa2

Contents?: true

Size: 575 Bytes

Versions: 9

Compression:

Stored size: 575 Bytes

Contents

#!/usr/bin/env ruby
require 'test/unit'
require 'stringio'
require_relative '../../app/condition'

class TestAppCondition < Test::Unit::TestCase
  include Trepan::Condition
  
  def test_basic
    assert valid_condition?('1+2')
    old_stderr = $stderr
    new_stdout = StringIO.new
    $stderr = new_stdout
    assert_equal(nil, valid_condition?('1+'), 
                 "Should have not been able to parse 1+")
    $stderr = old_stderr
    assert_equal(false, new_stdout.string.empty?, 
                 "Should have gotten some sort of compile error on stderr")
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
trepanning-2.15.35 test/unit/test-app-condition.rb
trepanning-1.93.35 test/unit/test-app-condition.rb
trepanning-2.15.33 test/unit/test-app-condition.rb
trepanning-1.93.32 test/unit/test-app-condition.rb
trepanning-0.1.6 test/unit/test-app-condition.rb
trepanning-0.1.4 test/unit/test-app-condition.rb
trepanning-0.1.3 test/unit/test-app-condition.rb
trepanning-0.1.2 test/unit/test-app-condition.rb
trepanning-0.1.1 test/unit/test-app-condition.rb