[tests] some coverage for blobs

This commit is contained in:
Tim Stack 2022-08-02 21:18:05 -07:00
parent 7b32ea9d39
commit 010198531b
5 changed files with 13 additions and 9 deletions

View File

@ -206,7 +206,7 @@ view_curses::mvwattrline(WINDOW* window,
whline(window, ' ', lr_bytes.lr_end - (full_line.size() + exp_offset));
}
stable_sort(sa.begin(), sa.end());
std::stable_sort(sa.begin(), sa.end());
for (auto iter = sa.begin(); iter != sa.end(); ++iter) {
auto attr_range = iter->sa_range;
@ -364,7 +364,6 @@ view_curses::mvwattrline(WINDOW* window,
}
}
#if 1
if (has_fg || has_bg) {
if (!has_fg) {
memset(fg_color, -1, line_width_chars * sizeof(short));
@ -381,11 +380,11 @@ view_curses::mvwattrline(WINDOW* window,
if (fg_color[lpc] == -1 && bg_color[lpc] == -1) {
continue;
}
# ifdef NCURSES_EXT_COLORS
#ifdef NCURSES_EXT_COLORS
auto cur_pair = row_ch[lpc].ext_color;
# else
#else
auto cur_pair = PAIR_NUMBER(row_ch[lpc].attr);
# endif
#endif
short cur_fg, cur_bg;
pair_content(cur_pair, &cur_fg, &cur_bg);
if (fg_color[lpc] == -1) {
@ -398,15 +397,14 @@ view_curses::mvwattrline(WINDOW* window,
int color_pair = vc.ensure_color_pair(fg_color[lpc], bg_color[lpc]);
row_ch[lpc].attr = row_ch[lpc].attr & ~A_COLOR;
# ifdef NCURSES_EXT_COLORS
#ifdef NCURSES_EXT_COLORS
row_ch[lpc].ext_color = color_pair;
# else
#else
row_ch[lpc].attr |= COLOR_PAIR(color_pair);
# endif
#endif
}
mvwadd_wchnstr(window, y, x, row_ch, ch_width);
}
#endif
}
constexpr short view_colors::MATCH_COLOR_DEFAULT;

View File

@ -818,6 +818,8 @@ EXPECTED_FILES = \
$(srcdir)/%reldir%/test_sql_str_func.sh_bfb7088916412360f77683009058b0747784630a.out \
$(srcdir)/%reldir%/test_sql_str_func.sh_bfe8b09e23389af0ef14359b66d68228d0285185.err \
$(srcdir)/%reldir%/test_sql_str_func.sh_bfe8b09e23389af0ef14359b66d68228d0285185.out \
$(srcdir)/%reldir%/test_sql_str_func.sh_c26269b10b9b9e8485aa97c2be2afb2cc3ee910d.err \
$(srcdir)/%reldir%/test_sql_str_func.sh_c26269b10b9b9e8485aa97c2be2afb2cc3ee910d.out \
$(srcdir)/%reldir%/test_sql_str_func.sh_c9e2f41431bef879364dc37a472ab01f64d89f89.err \
$(srcdir)/%reldir%/test_sql_str_func.sh_c9e2f41431bef879364dc37a472ab01f64d89f89.out \
$(srcdir)/%reldir%/test_sql_str_func.sh_cc53348c585ee71a7456157ad6b125689813bafe.err \

View File

@ -0,0 +1,2 @@
Row 0:
Column gunzip(decode(encode(gzip('Hello, World!'), 'base64'), 'base64')): Hello, World!

View File

@ -105,3 +105,5 @@ run_cap_test ./drive_sql "SELECT encode('foo', 'bar')"
run_cap_test ./drive_sql "SELECT encode('foo', null)"
run_cap_test ./drive_sql "SELECT encode(null, 'base64')"
run_cap_test ./drive_sql "SELECT gunzip(decode(encode(gzip('Hello, World!'), 'base64'), 'base64'))"