forked from enlightenment/terminology
have define BINARY_TYFUZZ/BINARY_TYTEST
This commit is contained in:
parent
1702931b1b
commit
abdef9786c
|
@ -545,7 +545,7 @@ _translate_options(void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(ENABLE_FUZZING) || defined(ENABLE_TESTS)
|
#if defined(BINARY_TYFUZZ) || defined(BINARY_TYTEST)
|
||||||
static void
|
static void
|
||||||
_log_void(const Eina_Log_Domain *_d EINA_UNUSED,
|
_log_void(const Eina_Log_Domain *_d EINA_UNUSED,
|
||||||
Eina_Log_Level level EINA_UNUSED,
|
Eina_Log_Level level EINA_UNUSED,
|
||||||
|
@ -846,7 +846,7 @@ elm_main(int argc, char **argv)
|
||||||
|
|
||||||
terminology_starting_up = EINA_TRUE;
|
terminology_starting_up = EINA_TRUE;
|
||||||
|
|
||||||
#if defined(ENABLE_FUZZING) || defined(ENABLE_TESTS)
|
#if defined(BINARY_TYFUZZ) || defined(BINARY_TYTEST)
|
||||||
eina_log_print_cb_set(_log_void, NULL);
|
eina_log_print_cb_set(_log_void, NULL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -129,7 +129,7 @@ if fuzzing
|
||||||
tyfuzz_sources,
|
tyfuzz_sources,
|
||||||
install: true,
|
install: true,
|
||||||
include_directories: config_dir,
|
include_directories: config_dir,
|
||||||
c_args: '-DENABLE_FUZZING=1',
|
c_args: '-DBINARY_TYFUZZ=1',
|
||||||
dependencies: terminology_dependencies)
|
dependencies: terminology_dependencies)
|
||||||
endif
|
endif
|
||||||
if tests
|
if tests
|
||||||
|
@ -137,6 +137,6 @@ if tests
|
||||||
tytest_sources,
|
tytest_sources,
|
||||||
install: true,
|
install: true,
|
||||||
include_directories: config_dir,
|
include_directories: config_dir,
|
||||||
c_args: '-DENABLE_TESTS=1',
|
c_args: '-DBINARY_TYTEST=1',
|
||||||
dependencies: terminology_dependencies)
|
dependencies: terminology_dependencies)
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -20,11 +20,11 @@ extern int terminology_starting_up;
|
||||||
* the normal 'terminology' binary.
|
* the normal 'terminology' binary.
|
||||||
* This is only useful to write tests
|
* This is only useful to write tests
|
||||||
*/
|
*/
|
||||||
#if !defined(ENABLE_FUZZING) && !defined(ENABLE_TESTS)
|
#if !defined(BINARY_TYFUZZ) && !defined(BINARY_TYTEST)
|
||||||
//#define ENABLE_TEST_UI
|
//#define ENABLE_TEST_UI
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(ENABLE_FUZZING) || defined(ENABLE_TESTS)
|
#if defined(BINARY_TYFUZZ) || defined(BINARY_TYTEST)
|
||||||
#define EINA_LOG_LEVEL_MAXIMUM (-1)
|
#define EINA_LOG_LEVEL_MAXIMUM (-1)
|
||||||
#endif
|
#endif
|
||||||
extern int _log_domain;
|
extern int _log_domain;
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
#include "sb.h"
|
#include "sb.h"
|
||||||
|
|
||||||
#if defined(ENABLE_TESTS)
|
#if defined(BINARY_TYTEST)
|
||||||
#include "unit_tests.h"
|
#include "unit_tests.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -173,7 +173,7 @@ ty_sb_free(struct ty_sb *sb)
|
||||||
sb->buf = NULL;
|
sb->buf = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(ENABLE_TESTS)
|
#if defined(BINARY_TYTEST)
|
||||||
static int
|
static int
|
||||||
tytest_sb_skip(void)
|
tytest_sb_skip(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "col.h"
|
#include "col.h"
|
||||||
#include "termpty.h"
|
#include "termpty.h"
|
||||||
#if !defined(ENABLE_FUZZING) && !defined(ENABLE_TESTS)
|
#if !defined(BINARY_TYFUZZ) && !defined(BINARY_TYTEST)
|
||||||
#include "win.h"
|
#include "win.h"
|
||||||
#endif
|
#endif
|
||||||
#include "termiointernals.h"
|
#include "termiointernals.h"
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#include "termptyops.h"
|
#include "termptyops.h"
|
||||||
#include "termiointernals.h"
|
#include "termiointernals.h"
|
||||||
#include "utf8.h"
|
#include "utf8.h"
|
||||||
#if defined(ENABLE_TESTS) || defined(ENABLE_TEST_UI)
|
#if defined(BINARY_TYTEST) || defined(ENABLE_TEST_UI)
|
||||||
#include "tytest.h"
|
#include "tytest.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -2007,7 +2007,7 @@ _mouse_selection_scroll(void *data)
|
||||||
if (!sd->pty->selection.makesel)
|
if (!sd->pty->selection.makesel)
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
|
|
||||||
#if defined(ENABLE_TESTS) || defined(ENABLE_TEST_UI)
|
#if defined(BINARY_TYTEST) || defined(ENABLE_TEST_UI)
|
||||||
test_pointer_canvas_xy_get(NULL, &my);
|
test_pointer_canvas_xy_get(NULL, &my);
|
||||||
#else
|
#else
|
||||||
evas_pointer_canvas_xy_get(evas_object_evas_get(sd->self), NULL, &my);
|
evas_pointer_canvas_xy_get(evas_object_evas_get(sd->self), NULL, &my);
|
||||||
|
@ -2089,7 +2089,7 @@ termio_internal_mouse_move(Termio *sd,
|
||||||
}
|
}
|
||||||
if (scroll == EINA_TRUE)
|
if (scroll == EINA_TRUE)
|
||||||
{
|
{
|
||||||
#if defined(ENABLE_TESTS) || defined(ENABLE_TEST_UI)
|
#if defined(BINARY_TYTEST) || defined(ENABLE_TEST_UI)
|
||||||
_mouse_selection_scroll(sd);
|
_mouse_selection_scroll(sd);
|
||||||
#else
|
#else
|
||||||
if (!sd->mouse_selection_scroll_timer)
|
if (!sd->mouse_selection_scroll_timer)
|
||||||
|
@ -2168,7 +2168,7 @@ termio_internal_mouse_move(Termio *sd,
|
||||||
/* TODO: make the following useless */
|
/* TODO: make the following useless */
|
||||||
if (sd->mouse_move_job)
|
if (sd->mouse_move_job)
|
||||||
ecore_job_del(sd->mouse_move_job);
|
ecore_job_del(sd->mouse_move_job);
|
||||||
#if !defined(ENABLE_TESTS)
|
#if !defined(BINARY_TYTEST)
|
||||||
sd->mouse_move_job = ecore_job_add(termio_smart_cb_mouse_move_job, sd);
|
sd->mouse_move_job = ecore_job_add(termio_smart_cb_mouse_move_job, sd);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef _TERMIOINTERNALS_H__
|
#ifndef _TERMIOINTERNALS_H__
|
||||||
#define _TERMIOINTERNALS_H__ 1
|
#define _TERMIOINTERNALS_H__ 1
|
||||||
|
|
||||||
#if defined(ENABLE_FUZZING) || defined(ENABLE_TESTS)
|
#if defined(BINARY_TYFUZZ) || defined(BINARY_TYTEST)
|
||||||
typedef void Term;
|
typedef void Term;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#include "termptyops.h"
|
#include "termptyops.h"
|
||||||
#include "backlog.h"
|
#include "backlog.h"
|
||||||
#include "keyin.h"
|
#include "keyin.h"
|
||||||
#if !defined(ENABLE_FUZZING) && !defined(ENABLE_TESTS)
|
#if !defined(BINARY_TYFUZZ) && !defined(BINARY_TYTEST)
|
||||||
# include "win.h"
|
# include "win.h"
|
||||||
#endif
|
#endif
|
||||||
#include "termio.h"
|
#include "termio.h"
|
||||||
|
@ -320,7 +320,7 @@ _handle_read(Termpty *ty, Eina_Bool false_on_empty)
|
||||||
}
|
}
|
||||||
if (ty->cb.change.func)
|
if (ty->cb.change.func)
|
||||||
ty->cb.change.func(ty->cb.change.data);
|
ty->cb.change.func(ty->cb.change.data);
|
||||||
#if defined(ENABLE_FUZZING) || defined(ENABLE_TESTS)
|
#if defined(BINARY_TYFUZZ) || defined(BINARY_TYTEST)
|
||||||
if (len <= 0)
|
if (len <= 0)
|
||||||
{
|
{
|
||||||
ty->exit_code = 0;
|
ty->exit_code = 0;
|
||||||
|
@ -583,7 +583,7 @@ termpty_new(const char *cmd, Eina_Bool login_shell, const char *cd,
|
||||||
|
|
||||||
ty->circular_offset = 0;
|
ty->circular_offset = 0;
|
||||||
|
|
||||||
#if defined(ENABLE_FUZZING) || defined(ENABLE_TESTS)
|
#if defined(BINARY_TYFUZZ) || defined(BINARY_TYTEST)
|
||||||
ty->fd = STDIN_FILENO;
|
ty->fd = STDIN_FILENO;
|
||||||
ty->hand_fd = ecore_main_fd_handler_add(ty->fd,
|
ty->hand_fd = ecore_main_fd_handler_add(ty->fd,
|
||||||
ECORE_FD_READ | ECORE_FD_ERROR,
|
ECORE_FD_READ | ECORE_FD_ERROR,
|
||||||
|
@ -1183,7 +1183,7 @@ termpty_cell_get(Termpty *ty, int y_requested, int x_requested)
|
||||||
void
|
void
|
||||||
termpty_write(Termpty *ty, const char *input, int len)
|
termpty_write(Termpty *ty, const char *input, int len)
|
||||||
{
|
{
|
||||||
#if defined(ENABLE_FUZZING)
|
#if defined(BINARY_TYFUZZ)
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
int res = ty_sb_add(&ty->write_buffer, input, len);
|
int res = ty_sb_add(&ty->write_buffer, input, len);
|
||||||
|
@ -1778,7 +1778,7 @@ term_link_free(Termpty *ty, Term_Link *link)
|
||||||
/* Remove from bitmap */
|
/* Remove from bitmap */
|
||||||
hl_bitmap_clear_bit(ty, id);
|
hl_bitmap_clear_bit(ty, id);
|
||||||
}
|
}
|
||||||
#if !defined(ENABLE_FUZZING) && !defined(ENABLE_TESTS)
|
#if !defined(BINARY_TYFUZZ) && !defined(BINARY_TYTEST)
|
||||||
int
|
int
|
||||||
termpty_color_class_get(Termpty *ty, const char *key,
|
termpty_color_class_get(Termpty *ty, const char *key,
|
||||||
int *r, int *g, int *b, int *a)
|
int *r, int *g, int *b, int *a)
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#include "termptyops.h"
|
#include "termptyops.h"
|
||||||
#include "termptyext.h"
|
#include "termptyext.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#if defined(ENABLE_TESTS)
|
#if defined(BINARY_TYTEST)
|
||||||
#include "tytest.h"
|
#include "tytest.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -654,7 +654,7 @@ _csi_truecolor_arg_get(Termpty *ty, Eina_Unicode **ptr)
|
||||||
return sum;
|
return sum;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(ENABLE_FUZZING)
|
#if !defined(BINARY_TYFUZZ)
|
||||||
/*********************************
|
/*********************************
|
||||||
* cache true color approximations
|
* cache true color approximations
|
||||||
*********************************
|
*********************************
|
||||||
|
@ -726,7 +726,7 @@ static uint8_t
|
||||||
_approximate_truecolor_rgb(Termpty *ty, uint8_t r0, uint8_t g0, uint8_t b0)
|
_approximate_truecolor_rgb(Termpty *ty, uint8_t r0, uint8_t g0, uint8_t b0)
|
||||||
{
|
{
|
||||||
uint8_t chosen_color = COL_DEF;
|
uint8_t chosen_color = COL_DEF;
|
||||||
#if defined(ENABLE_FUZZING)
|
#if defined(BINARY_TYFUZZ)
|
||||||
(void) ty;
|
(void) ty;
|
||||||
(void) r0;
|
(void) r0;
|
||||||
(void) g0;
|
(void) g0;
|
||||||
|
@ -3162,7 +3162,7 @@ _handle_resize_by_chars(Termpty *ty, Eina_Unicode **ptr)
|
||||||
DBG("Window manipulation: resize to %dx%d", w, h);
|
DBG("Window manipulation: resize to %dx%d", w, h);
|
||||||
|
|
||||||
/* ONLY FOR TESTING PURPOSE FTM */
|
/* ONLY FOR TESTING PURPOSE FTM */
|
||||||
#if defined(ENABLE_TESTS) || defined(ENABLE_TEST_UI)
|
#if defined(BINARY_TYTEST) || defined(ENABLE_TEST_UI)
|
||||||
{
|
{
|
||||||
#if defined(ENABLE_TEST_UI)
|
#if defined(ENABLE_TEST_UI)
|
||||||
Evas_Object *wn;
|
Evas_Object *wn;
|
||||||
|
@ -3575,7 +3575,7 @@ _handle_esc_csi(Termpty *ty, const Eina_Unicode *c, const Eina_Unicode *ce)
|
||||||
cc++;
|
cc++;
|
||||||
return cc - c;
|
return cc - c;
|
||||||
unhandled:
|
unhandled:
|
||||||
#if !defined(ENABLE_FUZZING) && !defined(ENABLE_TESTS)
|
#if !defined(BINARY_TYFUZZ) && !defined(BINARY_TYTEST)
|
||||||
if (eina_log_domain_level_check(_termpty_log_dom, EINA_LOG_LEVEL_WARN))
|
if (eina_log_domain_level_check(_termpty_log_dom, EINA_LOG_LEVEL_WARN))
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
@ -4044,7 +4044,7 @@ _handle_esc_osc(Termpty *ty, const Eina_Unicode *c, const Eina_Unicode *ce)
|
||||||
len = cc - c - (p - buf);
|
len = cc - c - (p - buf);
|
||||||
if (_xterm_parse_color(ty, &p, &r, &g, &b, len) < 0)
|
if (_xterm_parse_color(ty, &p, &r, &g, &b, len) < 0)
|
||||||
goto err;
|
goto err;
|
||||||
#if !defined(ENABLE_FUZZING) && !defined(ENABLE_TESTS)
|
#if !defined(BINARY_TYFUZZ) && !defined(BINARY_TYTEST)
|
||||||
evas_object_textgrid_palette_set(
|
evas_object_textgrid_palette_set(
|
||||||
termio_textgrid_get(ty->obj),
|
termio_textgrid_get(ty->obj),
|
||||||
EVAS_TEXTGRID_PALETTE_STANDARD, 0,
|
EVAS_TEXTGRID_PALETTE_STANDARD, 0,
|
||||||
|
@ -4669,7 +4669,7 @@ termpty_handle_seq(Termpty *ty, const Eina_Unicode *c, const Eina_Unicode *ce)
|
||||||
last_char = c[len-1];
|
last_char = c[len-1];
|
||||||
|
|
||||||
end:
|
end:
|
||||||
#if !defined(ENABLE_FUZZING) && !defined(ENABLE_TESTS)
|
#if !defined(BINARY_TYFUZZ) && !defined(BINARY_TYTEST)
|
||||||
if (ty->decoding_error)
|
if (ty->decoding_error)
|
||||||
{
|
{
|
||||||
int j;
|
int j;
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#include "termpty.h"
|
#include "termpty.h"
|
||||||
#include "termptyops.h"
|
#include "termptyops.h"
|
||||||
#include "termiointernals.h"
|
#include "termiointernals.h"
|
||||||
#if defined(ENABLE_TESTS) || defined(ENABLE_TEST_UI)
|
#if defined(BINARY_TYTEST) || defined(ENABLE_TEST_UI)
|
||||||
#include "tytest.h"
|
#include "tytest.h"
|
||||||
#endif
|
#endif
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
// handled here at all and just passed to termio to figure it out (return
|
// handled here at all and just passed to termio to figure it out (return
|
||||||
// EINA_FALSE).
|
// EINA_FALSE).
|
||||||
|
|
||||||
#if defined(ENABLE_TESTS) || defined(ENABLE_TEST_UI)
|
#if defined(BINARY_TYTEST) || defined(ENABLE_TEST_UI)
|
||||||
|
|
||||||
static int _mx;
|
static int _mx;
|
||||||
static int _my;
|
static int _my;
|
||||||
|
@ -143,7 +143,7 @@ _handle_mouse_down(Termpty *ty,
|
||||||
_tytest_arg_get(buf, &value);
|
_tytest_arg_get(buf, &value);
|
||||||
ev.flags = value;
|
ev.flags = value;
|
||||||
|
|
||||||
#if defined(ENABLE_TESTS) || defined(ENABLE_TEST_UI)
|
#if defined(BINARY_TYTEST) || defined(ENABLE_TEST_UI)
|
||||||
test_set_mouse_pointer(ev.canvas.x, ev.canvas.y);
|
test_set_mouse_pointer(ev.canvas.x, ev.canvas.y);
|
||||||
#endif
|
#endif
|
||||||
termio_internal_mouse_down(sd, &ev, modifiers);
|
termio_internal_mouse_down(sd, &ev, modifiers);
|
||||||
|
@ -180,7 +180,7 @@ _handle_mouse_up(Termpty *ty,
|
||||||
_tytest_arg_get(buf, &value);
|
_tytest_arg_get(buf, &value);
|
||||||
ev.flags = value;
|
ev.flags = value;
|
||||||
|
|
||||||
#if defined(ENABLE_TESTS) || defined(ENABLE_TEST_UI)
|
#if defined(BINARY_TYTEST) || defined(ENABLE_TEST_UI)
|
||||||
test_set_mouse_pointer(ev.canvas.x, ev.canvas.y);
|
test_set_mouse_pointer(ev.canvas.x, ev.canvas.y);
|
||||||
#endif
|
#endif
|
||||||
termio_internal_mouse_up(sd, &ev, modifiers);
|
termio_internal_mouse_up(sd, &ev, modifiers);
|
||||||
|
@ -209,7 +209,7 @@ _handle_mouse_move(Termpty *ty,
|
||||||
/* MODIFIERS */
|
/* MODIFIERS */
|
||||||
_tytest_modifiers_get(buf, &modifiers);
|
_tytest_modifiers_get(buf, &modifiers);
|
||||||
|
|
||||||
#if defined(ENABLE_TESTS) || defined(ENABLE_TEST_UI)
|
#if defined(BINARY_TYTEST) || defined(ENABLE_TEST_UI)
|
||||||
test_set_mouse_pointer(ev.cur.canvas.x, ev.cur.canvas.y);
|
test_set_mouse_pointer(ev.cur.canvas.x, ev.cur.canvas.y);
|
||||||
#endif
|
#endif
|
||||||
termio_internal_mouse_move(sd, &ev, modifiers);
|
termio_internal_mouse_move(sd, &ev, modifiers);
|
||||||
|
@ -247,7 +247,7 @@ _handle_mouse_wheel(Termpty *ty,
|
||||||
/* MODIFIERS */
|
/* MODIFIERS */
|
||||||
_tytest_modifiers_get(buf, &modifiers);
|
_tytest_modifiers_get(buf, &modifiers);
|
||||||
|
|
||||||
#if defined(ENABLE_TESTS) || defined(ENABLE_TEST_UI)
|
#if defined(BINARY_TYTEST) || defined(ENABLE_TEST_UI)
|
||||||
test_set_mouse_pointer(ev.canvas.x, ev.canvas.y);
|
test_set_mouse_pointer(ev.canvas.x, ev.canvas.y);
|
||||||
#endif
|
#endif
|
||||||
termio_internal_mouse_wheel(sd, &ev, modifiers);
|
termio_internal_mouse_wheel(sd, &ev, modifiers);
|
||||||
|
@ -466,7 +466,7 @@ tytest_handle_escape_codes(Termpty *ty,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(ENABLE_TESTS) || defined(ENABLE_TEST_UI)
|
#if defined(BINARY_TYTEST) || defined(ENABLE_TEST_UI)
|
||||||
#define ARG_USED_FOR_TESTS
|
#define ARG_USED_FOR_TESTS
|
||||||
#else
|
#else
|
||||||
#define ARG_USED_FOR_TESTS EINA_UNUSED
|
#define ARG_USED_FOR_TESTS EINA_UNUSED
|
||||||
|
@ -479,7 +479,7 @@ termpty_ext_handle(Termpty *ty ARG_USED_FOR_TESTS,
|
||||||
{
|
{
|
||||||
switch (buf[0]) // major opcode
|
switch (buf[0]) // major opcode
|
||||||
{
|
{
|
||||||
#if defined(ENABLE_TESTS) || defined(ENABLE_TEST_UI)
|
#if defined(BINARY_TYTEST) || defined(ENABLE_TEST_UI)
|
||||||
case 't':
|
case 't':
|
||||||
tytest_handle_escape_codes(ty, buf + 1);
|
tytest_handle_escape_codes(ty, buf + 1);
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef _TYTEST_H__
|
#ifndef _TYTEST_H__
|
||||||
#define _TYTEST_H__ 1
|
#define _TYTEST_H__ 1
|
||||||
|
|
||||||
#if defined(ENABLE_TESTS)
|
#if defined(BINARY_TYTEST)
|
||||||
#define evas_object_textgrid_palette_get test_textgrid_palette_get
|
#define evas_object_textgrid_palette_get test_textgrid_palette_get
|
||||||
void
|
void
|
||||||
test_textgrid_palette_get(const Evas_Object *obj,
|
test_textgrid_palette_get(const Evas_Object *obj,
|
||||||
|
@ -20,7 +20,7 @@ void
|
||||||
tytest_termio_resize(int w, int h);
|
tytest_termio_resize(int w, int h);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(ENABLE_TESTS) || defined(ENABLE_TEST_UI)
|
#if defined(BINARY_TYTEST) || defined(ENABLE_TEST_UI)
|
||||||
void
|
void
|
||||||
test_pointer_canvas_xy_get(int *mx,
|
test_pointer_canvas_xy_get(int *mx,
|
||||||
int *my);
|
int *my);
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
#include "termptyops.h"
|
#include "termptyops.h"
|
||||||
#include "termiointernals.h"
|
#include "termiointernals.h"
|
||||||
#include "tytest_common.h"
|
#include "tytest_common.h"
|
||||||
#if defined(ENABLE_TESTS)
|
#if defined(BINARY_TYTEST)
|
||||||
#include "col.h"
|
#include "col.h"
|
||||||
#include "tytest.h"
|
#include "tytest.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -44,7 +44,7 @@ static Termio _sd = {
|
||||||
.config = NULL,
|
.config = NULL,
|
||||||
};
|
};
|
||||||
static const char *_cursor_shape = "undefined";
|
static const char *_cursor_shape = "undefined";
|
||||||
#if defined(ENABLE_TESTS)
|
#if defined(BINARY_TYTEST)
|
||||||
static Evas_Textgrid_Cell *_cells;
|
static Evas_Textgrid_Cell *_cells;
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
|
@ -294,7 +294,7 @@ termio_textgrid_get(const Evas_Object *obj EINA_UNUSED)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(ENABLE_TESTS)
|
#if defined(BINARY_TYTEST)
|
||||||
void
|
void
|
||||||
test_textgrid_palette_get(const Evas_Object *obj EINA_UNUSED,
|
test_textgrid_palette_get(const Evas_Object *obj EINA_UNUSED,
|
||||||
Evas_Textgrid_Palette pal,
|
Evas_Textgrid_Palette pal,
|
||||||
|
@ -424,7 +424,7 @@ tytest_common_init(void)
|
||||||
_config = config_new();
|
_config = config_new();
|
||||||
_sd.config = _config;
|
_sd.config = _config;
|
||||||
_termpty_init(&_ty, _config);
|
_termpty_init(&_ty, _config);
|
||||||
#if defined(ENABLE_TESTS)
|
#if defined(BINARY_TYTEST)
|
||||||
_cells = calloc(TY_H * TY_W, sizeof(Evas_Textgrid_Cell));
|
_cells = calloc(TY_H * TY_W, sizeof(Evas_Textgrid_Cell));
|
||||||
assert(_cells != NULL);
|
assert(_cells != NULL);
|
||||||
#endif
|
#endif
|
||||||
|
@ -434,7 +434,7 @@ void
|
||||||
tytest_common_shutdown(void)
|
tytest_common_shutdown(void)
|
||||||
{
|
{
|
||||||
config_del(_config);
|
config_del(_config);
|
||||||
#if defined(ENABLE_TESTS)
|
#if defined(BINARY_TYTEST)
|
||||||
free(_cells);
|
free(_cells);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ void tytest_common_main_loop(void);
|
||||||
void tytest_common_init(void);
|
void tytest_common_init(void);
|
||||||
void tytest_common_shutdown(void);
|
void tytest_common_shutdown(void);
|
||||||
void tytest_common_set_fd(int fd);
|
void tytest_common_set_fd(int fd);
|
||||||
#if defined(ENABLE_TESTS)
|
#if defined(BINARY_TYTEST)
|
||||||
const char *tytest_cursor_shape_get(void);
|
const char *tytest_cursor_shape_get(void);
|
||||||
Termpty *tytest_termpty_get(void);
|
Termpty *tytest_termpty_get(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue