jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
Signup
JRuby
  • JRuby
  • JRUBY-1890 Rubicon test_io failures
  • JRUBY-1895

IO.popen does not support "-"

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Sub-task Sub-task
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Won't Fix
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: Core Classes/Modules
  • Labels:
    None
  • Number of attachments :
    0

Description

popen("-") is not supported in JRuby yet

Error:

  5) Error:
test_s_popen_spawn(TestIO):
IOError: Cannot run program "-" (in directory "/Users/headius/NetBeansProjects/jruby"): -: not found
    /Users/headius/NetBeansProjects/jruby/lib/ruby/1.8/test/unit/testcase.rb:78:in `run'
    /Users/headius/NetBeansProjects/jruby/lib/ruby/1.8/test/unit/testsuite.rb:34:in `run'
    /Users/headius/NetBeansProjects/jruby/lib/ruby/1.8/test/unit/testsuite.rb:33:in `each'
    /Users/headius/NetBeansProjects/jruby/lib/ruby/1.8/test/unit/testsuite.rb:33:in `run'
    /Users/headius/NetBeansProjects/jruby/lib/ruby/1.8/test/unit/testsuite.rb:33:in `each'
    /Users/headius/NetBeansProjects/jruby/lib/ruby/1.8/test/unit/testsuite.rb:33:in `run'
    /Users/headius/NetBeansProjects/jruby/lib/ruby/1.8/test/unit/testsuite.rb:33:in `run_suite'
    /Users/headius/NetBeansProjects/jruby/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:46:in `start_mediator'
    /Users/headius/NetBeansProjects/jruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:41:in `start'
    /Users/headius/NetBeansProjects/jruby/lib/ruby/1.8/test/unit/ui/testrunnerutilities.rb:29:in `run'
    /Users/headius/NetBeansProjects/jruby/lib/ruby/1.8/test/unit/autorunner.rb:216:in `run'
    /Users/headius/NetBeansProjects/jruby/lib/ruby/1.8/test/unit/autorunner.rb:12:in `run'
    /Users/headius/NetBeansProjects/jruby/lib/ruby/1.8/test/unit.rb:278:in `run'
    /Users/headius/NetBeansProjects/jruby/lib/ruby/1.8/test/unit.rb:276

Test:

  def test_s_popen_spawn
    unless WIN32
      # Spawn an interpreter - WRITE
      parent = $$
      pipe = IO.popen("-", "w")
      
      if pipe
	begin
	  assert_equal(parent, $$)
	  pipe.puts "12"
	  Process.wait pipe.pid
	  assert_equal(12, $?>>8)
	ensure
	  pipe.close
	end
      else
	buff = $stdin.gets
	exit buff.to_i
      end
      
      # Spawn an interpreter - READWRITE
      parent = $$
      p = IO.popen("-", "w+")
      
      if p
	begin
	  assert_equal(parent, $$)
	  p.puts "Hello\n"
	  assert_equal("Goodbye\n", p.gets)
	  Process.wait
	ensure
	  p.close
	end
      else
	puts "Goodbye" if $stdin.gets == "Hello\n"
	exit
      end
    end
  end   

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity

People

  • Assignee:
    Charles Oliver Nutter
    Reporter:
    Charles Oliver Nutter
Vote (0)
Watch (3)

Dates

  • Created:
    04/Jan/08 8:53 PM
    Updated:
    27/Oct/09 1:48 PM
    Resolved:
    03/Feb/09 10:53 PM
  • Atlassian JIRA (v5.2.7#850-sha1:b2af0c8)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.