test(libc): cover getcwd zero-size buffer
This commit is contained in:
parent
f8c2f07246
commit
d809ccf797
|
|
@ -26,6 +26,7 @@ int main() {
|
|||
char tiny[] = "xyz";
|
||||
Require(getcwd_nid_postfix(tiny, 2) == nullptr && *__error_nid_postfix() == 34);
|
||||
Require(std::strcmp(tiny, "xyz") == 0);
|
||||
Require(getcwd_nid_postfix(path, 0) == nullptr && *__error_nid_postfix() == 22);
|
||||
char* allocated = getcwd_nid_postfix(nullptr, 0);
|
||||
Require(allocated && std::strcmp(allocated, path) == 0);
|
||||
GuestHeap::GuestHeapFree_nid_postfix(allocated);
|
||||
|
|
|
|||
Loading…
Reference in New Issue