static void test_unescape_char_quoted(void) {
        const char *string = "\\a";
        const char *in = string;
        size_t n_in = strlen(string);
        char *out = NULL;
        size_t n_out = 0;
        int r;

        r = c_shquote_unescape_char_quoted(&out, &n_out, &in, &n_in);
        c_assert(r == C_SHQUOTE_E_NO_SPACE);
        c_assert(in == string);
        c_assert(n_in == strlen(string));

        --n_in;
        r = c_shquote_unescape_char_quoted(&out, &n_out, &in, &n_in);
        c_assert(r == C_SHQUOTE_E_BAD_QUOTING);
        c_assert(in == string);
        c_assert(n_in == strlen(string) - 1);

        test_unescape_char_quoted_one("\\a", 2, false);
        test_unescape_char_quoted_one("\\\"", 2, true);
        test_unescape_char_quoted_one("\\\\", 2, true);
        test_unescape_char_quoted_one("\\`", 2, true);
        test_unescape_char_quoted_one("\\$", 2, true);
        test_unescape_char_quoted_one("\\\n", 2, true);
}
static void test_unescape_char_quoted(void) {
        const char *string = "\\a";
        const char *in = string;
        size_t n_in = strlen(string);
        char *out = NULL;
        size_t n_out = 0;
        int r;

        r = c_shquote_unescape_char_quoted(&out, &n_out, &in, &n_in);
        c_assert(r == C_SHQUOTE_E_NO_SPACE);
        c_assert(in == string);
        c_assert(n_in == strlen(string));

        --n_in;
        r = c_shquote_unescape_char_quoted(&out, &n_out, &in, &n_in);
        c_assert(r == C_SHQUOTE_E_BAD_QUOTING);
        c_assert(in == string);
        c_assert(n_in == strlen(string) - 1);

        test_unescape_char_quoted_one("\\a", 2, false);
        test_unescape_char_quoted_one("\\\"", 2, true);
        test_unescape_char_quoted_one("\\\\", 2, true);
        test_unescape_char_quoted_one("\\`", 2, true);
        test_unescape_char_quoted_one("\\$", 2, true);
        test_unescape_char_quoted_one("\\\n", 2, true);
}