diff --git a/Tests/LibC/CMakeLists.txt b/Tests/LibC/CMakeLists.txt index ba28c56ba5..47980a90e2 100644 --- a/Tests/LibC/CMakeLists.txt +++ b/Tests/LibC/CMakeLists.txt @@ -11,6 +11,7 @@ set(TEST_SOURCES TestLibCTime.cpp TestMemmem.cpp TestQsort.cpp + TestRaise.cpp TestRealpath.cpp TestScanf.cpp TestSearch.cpp diff --git a/Tests/LibC/TestRaise.cpp b/Tests/LibC/TestRaise.cpp new file mode 100644 index 0000000000..7957ab4562 --- /dev/null +++ b/Tests/LibC/TestRaise.cpp @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2021, the SerenityOS developers. + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include + +#include + +TEST_CASE(raise) +{ + EXPECT_CRASH("This should raise a SIGUSR1 signal", [] { + raise(SIGUSR1); + return Test::Crash::Failure::DidNotCrash; + }); +}