aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2018-11-26 22:58:25 +0100
committerBoris Faure <billiob@gmail.com>2018-12-27 22:14:44 +0100
commitce07e811808f6a877f960cae09a2ae4251e1aa54 (patch)
treee487edc14a2a525b42eedcd014ba8bbe1e85e169 /src
parenttests: add tests on fonts: normal/italic/blod/bolditalic/fraktur/encircled (diff)
downloadterminology-ce07e811808f6a877f960cae09a2ae4251e1aa54.tar.gz
tests: on cursor shapes and regen tests.results
Diffstat (limited to 'src')
-rw-r--r--src/bin/tyfuzz.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/bin/tyfuzz.c b/src/bin/tyfuzz.c
index c80b34e..c5106eb 100644
--- a/src/bin/tyfuzz.c
+++ b/src/bin/tyfuzz.c
@@ -65,15 +65,17 @@ termio_font_size_set(Evas_Object *obj EINA_UNUSED,
{
}
-
+#ifndef TYTEST
void
termio_set_cursor_shape(Evas_Object *obj EINA_UNUSED,
Cursor_Shape shape EINA_UNUSED)
{
}
+#endif
/* }}} */
/* {{{ TYTEST */
#ifdef TYTEST
+const char *_cursor_shape = "undefined";
typedef struct _Termpty_Tests
{
size_t backsize, backpos;
@@ -88,6 +90,24 @@ typedef struct _Termpty_Tests
unsigned int bracketed_paste : 1;
} Termpty_Tests;
+void
+termio_set_cursor_shape(Evas_Object *obj EINA_UNUSED,
+ Cursor_Shape shape EINA_UNUSED)
+{
+ switch (shape)
+ {
+ case CURSOR_SHAPE_UNDERLINE:
+ _cursor_shape = "underline";
+ break;
+ case CURSOR_SHAPE_BAR:
+ _cursor_shape = "bar";
+ break;
+ default:
+ case CURSOR_SHAPE_BLOCK:
+ _cursor_shape = "block";
+ }
+}
+
static void
_termpty_to_termpty_tests(Termpty *ty, Termpty_Tests *tt)
{
@@ -152,6 +172,8 @@ _tytest_checksum(Termpty *ty)
{
MD5Update(&ctx, (unsigned char const*)"(NULL)", 6);
}
+ MD5Update(&ctx, (unsigned char const*)_cursor_shape,
+ strlen(_cursor_shape));
MD5Final(hash, &ctx);