/*****
 NAME
 	ccmdtext-test.m - test program for CCmdText class
 VERSION
 	$Id$
 CHANGELOG
	$Log$
 */

#include <stdio.h>
#include <coconut/ccmdtext.h>
#include <coconut/cstring.h>
#include <coconut/cindtstream.h>

int main()
{
	id <PCmdText>		cmd ;
	id <PString>		str ;
	id <PIndentStream>	stream ;

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

	cmd = [[CCmdText alloc] init] ;
	str = [[CString alloc] init] ;
	[str setPtr: "this is a test program for CCmdText class."] ;
	stream = [[CIndtStream alloc] init] ;

	printf("type : %x\n", (u_int) [cmd type]) ;
	printf("append str: \"%s\"\n", [str ptr]) ;
	fflush(stdout) ;

	[cmd appendStr: str] ;
	[cmd print: stream] ;
	[stream flush] ;

	printf("\nbye.\n") ;
	[stream release] ;
	return 0 ;
}

