• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Capturing STDOUT from unit test
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Capturing STDOUT from unit test


  • Subject: Re: Capturing STDOUT from unit test
  • From: "Jason Sallis" <email@hidden>
  • Date: Tue, 24 Jul 2007 16:46:00 -0600

I think that gives me enough to get started.  Thanks to everyone for your
advice!

On 7/24/07, Andrew Farmer <email@hidden> wrote:

On 24 Jul 07, at 15:31, Jason Sallis wrote: > Perfect! Thanks, Nick. > Ok, that gets me to the point where I can redirect to a file. > Ideally, I'd > like to redirect to an in-memory buffer instead to avoid the > overhead of a > file. Can anyone provide an example to accomplish that with > freopen? Or is > that even possible (or necessary)? Unfortunately, my Unix programming > experience is all but nonexistant. :-(

Redirect stdout to a pipe of which you hold both ends. Check the man
pages
for pipe() and fdopen(). (You'll need to specifically ask for `man 2
pipe`,
as there's also an unrelated command called "pipe".)

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Capturing STDOUT from unit test (From: "Jason Sallis" <email@hidden>)
 >Re: Capturing STDOUT from unit test (From: Nick Zitzmann <email@hidden>)
 >Re: Capturing STDOUT from unit test (From: "Jason Sallis" <email@hidden>)
 >Re: Capturing STDOUT from unit test (From: Nick Zitzmann <email@hidden>)
 >Re: Capturing STDOUT from unit test (From: "Jason Sallis" <email@hidden>)
 >Re: Capturing STDOUT from unit test (From: Nick Zitzmann <email@hidden>)
 >Re: Capturing STDOUT from unit test (From: "Jason Sallis" <email@hidden>)
 >Re: Capturing STDOUT from unit test (From: Andrew Farmer <email@hidden>)

  • Prev by Date: Re: Capturing STDOUT from unit test
  • Next by Date: Re: How useful are bit operators?
  • Previous by thread: Re: Capturing STDOUT from unit test
  • Next by thread: Re: Capturing STDOUT from unit test
  • Index(es):
    • Date
    • Thread