Make test more lenient for custom clang version strings
[llvm-project.git] / libc / test / src / unistd / pipe_test.cpp
blob9c633dea1dba559c2a6c5b6bef06523d23fba947
1 //===-- Unittests for pipe ------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 #include "src/unistd/close.h"
9 #include "src/unistd/pipe.h"
11 #include "test/UnitTest/ErrnoSetterMatcher.h"
12 #include "test/UnitTest/Test.h"
14 using namespace LIBC_NAMESPACE::testing::ErrnoSetterMatcher;
16 TEST(LlvmLibcPipeTest, SmokeTest) {
18 int pipefd[2];
20 ASSERT_THAT(LIBC_NAMESPACE::pipe(pipefd), Succeeds());
22 ASSERT_THAT(LIBC_NAMESPACE::close(pipefd[0]), Succeeds());
23 ASSERT_THAT(LIBC_NAMESPACE::close(pipefd[1]), Succeeds());
26 // TODO: Functionality tests