/*****
 NAME
 	ccmdprint-test.m - test program for CCmdPrint class
 VERSION
 	$Id$
 CHANGELOG
	$Log$
 */

#include <coconut/ccmdprint.h>
#include <coconut/ccmdtext.h>
#include <coconut/cstring.h>

int main()
{
	id <PCmdPrint>	cmd ;
	id <PCmdText>	text ;
	id <PString>	str ;

	printf("***** test program for CCmdPrint class\n") ;
	fflush(stdout) ;

	text = [[CCmdText alloc] init] ;
	str = [[CString alloc] init] ;
	[str setPtr: "Hello, World"] ;
	[text appendStr: str] ;
	[str release] ;

	cmd = [[CCmdPrint alloc] init] ;
	[cmd appendChild: text] ;
	[text release] ;

	[cmd exec: nil with: nil] ;

	[cmd release] ;
	printf("\nbye.\n") ;
	fflush(stdout) ;
	return 0 ;
}

