How do I write test cases for interactive commands?
Alan Somers
asomers at freebsd.org
Thu Apr 15 00:50:22 UTC 2021
On Wed, Apr 14, 2021 at 6:24 PM Yoshihiro Ota <ota at j.email.ne.jp> wrote:
> Hi,
>
> I'm interested in writing some test cases for lldb and clang.
>
> How can I write interactive command in/out in Kyua?
> Does anyone have some examples?
>
> I'm also interested in writing test programs to compile again clang to
> find compiler/linker bugs.
> Where do we use for temporary files and how do we clean up?
>
> Thanks,
> Hiro
>
Interactive commands like those that print a prompt and wait for user
input? Use lang/expect from ports. As for temporary files, Kyua creates a
fresh temporary directory for every test. So you can write files to $PWD,
and Kyua will automatically clean it up.
-Alan
More information about the freebsd-hackers
mailing list