This is an archive of the discontinued LLVM Phabricator instance.

[libc] Add a test for `fputs` to check using `stdout` and `stderr`
ClosedPublic

Authored by jhuber6 on Jun 6 2023, 9:57 AM.

Details

Summary

This patch adds a test directly for the fputs function similar to the
existing puts test. This lets us know that the default file pointers
are function and the fputs interface works.

Diff Detail

Event Timeline

jhuber6 created this revision.Jun 6 2023, 9:57 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJun 6 2023, 9:57 AM
jhuber6 requested review of this revision.Jun 6 2023, 9:57 AM
lntue accepted this revision.Jun 6 2023, 9:59 AM
This revision is now accepted and ready to land.Jun 6 2023, 9:59 AM

This should probably be more similar to the putc test, which writes to a file so that the result can be checked.

This should probably be more similar to the putc test, which writes to a file so that the result can be checked.

Yeah, I wanted something to test this for the GPU but I don't currently support any FILE IO that's not stderr or stdout. There's some more work on that front required.