static void test_unescape_char_unquoted_one(const char *string, size_t n_string, bool escaped) {
        char buf[1];
        char *out = buf;
        size_t n_out = sizeof(buf);
        const char *in = string;
        size_t n_in = n_string;
        int r;

        r = c_shquote_unescape_char_unquoted(&out, &n_out, &in, &n_in);
        c_assert(!r);

        if (escaped) {
                c_assert(in == string + 2);
                c_assert(n_in == n_string - 2);
                c_assert(out == buf);
                c_assert(n_out == sizeof(buf));
        } else {
                if (n_string == 1) {
                        c_assert(in == string + 1);
                        c_assert(n_in == n_string - 1);
                        c_assert(out == buf);
                        c_assert(n_out == sizeof(buf));
                } else {
                        c_assert(in == string + 2);
                        c_assert(n_in == n_string - 2);
                        c_assert(out == buf + 1);
                        c_assert(n_out == sizeof(buf) - 1);
                        c_assert(buf[0] == string[1]);
                }
        }
}
static void test_unescape_char_unquoted_one(const char *string, size_t n_string, bool escaped) {
        char buf[1];
        char *out = buf;
        size_t n_out = sizeof(buf);
        const char *in = string;
        size_t n_in = n_string;
        int r;

        r = c_shquote_unescape_char_unquoted(&out, &n_out, &in, &n_in);
        c_assert(!r);

        if (escaped) {
                c_assert(in == string + 2);
                c_assert(n_in == n_string - 2);
                c_assert(out == buf);
                c_assert(n_out == sizeof(buf));
        } else {
                if (n_string == 1) {
                        c_assert(in == string + 1);
                        c_assert(n_in == n_string - 1);
                        c_assert(out == buf);
                        c_assert(n_out == sizeof(buf));
                } else {
                        c_assert(in == string + 2);
                        c_assert(n_in == n_string - 2);
                        c_assert(out == buf + 1);
                        c_assert(n_out == sizeof(buf) - 1);
                        c_assert(buf[0] == string[1]);
                }
        }
}