TEST(RegexMatchExpression, RegexCannotContainEmbeddedNullByte) {
    RegexMatchExpression regex;
    {
        const auto embeddedNull = "a\0b"_sd;
        ASSERT_NOT_OK(regex.init("path", embeddedNull, ""));
    }

    {
        const auto singleNullByte = "\0"_sd;
        ASSERT_NOT_OK(regex.init("path", singleNullByte, ""));
    }

    {
        const auto leadingNullByte = "\0bbbb"_sd;
        ASSERT_NOT_OK(regex.init("path", leadingNullByte, ""));
    }

    {
        const auto trailingNullByte = "bbbb\0"_sd;
        ASSERT_NOT_OK(regex.init("path", trailingNullByte, ""));
    }
}
TEST(RegexMatchExpression, RegexCannotContainEmbeddedNullByte) {
    RegexMatchExpression regex;
    {
        const auto embeddedNull = "a\0b"_sd;
        ASSERT_NOT_OK(regex.init("path", embeddedNull, ""));
    }

    {
        const auto singleNullByte = "\0"_sd;
        ASSERT_NOT_OK(regex.init("path", singleNullByte, ""));
    }

    {
        const auto leadingNullByte = "\0bbbb"_sd;
        ASSERT_NOT_OK(regex.init("path", leadingNullByte, ""));
    }

    {
        const auto trailingNullByte = "bbbb\0"_sd;
        ASSERT_NOT_OK(regex.init("path", trailingNullByte, ""));
    }
}