mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-16 10:03:50 +01:00
unittests/vfs: Add test case for #8309
This commit is contained in:
parent
be14d2eace
commit
d24cd4fd73
@ -19,6 +19,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "embUnit/embUnit.h"
|
#include "embUnit/embUnit.h"
|
||||||
|
|
||||||
@ -71,6 +72,9 @@ static void test_vfs_bind(void)
|
|||||||
uint8_t buf[_VFS_TEST_BIND_BUFSIZE];
|
uint8_t buf[_VFS_TEST_BIND_BUFSIZE];
|
||||||
fd = vfs_bind(VFS_ANY_FD, O_RDWR, &_test_bind_ops, &buf[0]);
|
fd = vfs_bind(VFS_ANY_FD, O_RDWR, &_test_bind_ops, &buf[0]);
|
||||||
TEST_ASSERT(fd >= 0);
|
TEST_ASSERT(fd >= 0);
|
||||||
|
TEST_ASSERT(fd != STDIN_FILENO);
|
||||||
|
TEST_ASSERT(fd != STDOUT_FILENO);
|
||||||
|
TEST_ASSERT(fd != STDERR_FILENO);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user