dejagnu
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Batch test example


From: Raymond Law
Subject: Re: Batch test example
Date: Thu, 26 Feb 2004 14:39:57 -0800 (PST)

Thanks for the quick reply.

> > I've read the Dejagnu manual and wrote a simple
> interactive program
> > and a testsuite.  But I haven't been able to find
> examples of
> > testing a batch program.
> 
> Testing batch programs is generally easier than
> testing interactive
> programs.  Instead of having to "talk" to the
> program, you just spawn
> it and see what output it produces, or what exit
> code it terminates
> with.

So the test script basically looks like:

set test test1
expect { -re "Hello" { pass $test} }

without the need to use send?  What is the role of the
variable test anyway?

> > Also, is there a way I can call a C++ function
> from the tcl test
> > script?  Thanks in advance.
> 
> You'll either need to instrument your C++ program so
> that you can unit
> test your function (if that's what you're trying to
> do), or use the
> C/C++ unit testing support that was recently
> introduced into DejaGnu.

Can you give examples or basic structure of both?  I
was searching for related examples but in vain.  The
manual only lists the pass, fail, expected
pass,...etc. calls for unit testing, but doesn't
really show how to use them.

Thanks,
Ray


__________________________________
Do you Yahoo!?
Get better spam protection with Yahoo! Mail.
http://antispam.yahoo.com/tools




reply via email to

[Prev in Thread] Current Thread [Next in Thread]