tests: on cursor shapes and regen tests.results

This commit is contained in:
Boris Faure 2018-11-26 22:58:25 +01:00
parent c104ad38e0
commit ce07e81180
10 changed files with 54 additions and 8 deletions

View File

@ -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);

2
tests/cursor-shape-0.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
printf '\033[0 q'

2
tests/cursor-shape-1.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
printf '\033[1 q'

2
tests/cursor-shape-2.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
printf '\033[2 q'

2
tests/cursor-shape-3.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
printf '\033[3 q'

2
tests/cursor-shape-4.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
printf '\033[4 q'

2
tests/cursor-shape-5.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
printf '\033[5 q'

2
tests/cursor-shape-6.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
printf '\033[6 q'

2
tests/cursor-shape-7.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
printf '\033[7 q'

View File

@ -1,7 +1,15 @@
decfra-no-restrict-cursor.sh 236d1c32fe49c8762ad204510117b1da
decfra-restrict-cursor.sh 898682203275b186e6c81424b93b1b79
decera-no-restrict-cursor.sh d92d38dfe6fd6b4100e3f0dac0e0a405
decera-restrict-cursor.sh baae3f0eef7e6f0032ba74f11ee306f6
decera-decfra-extra.sh 53d28f0d90c30aefd0b9176572c47f63
cursor-movements.sh 7ebb03610346e8fa56e171c55e7e2ec5
fonts.sh be86e6ee87f551928a9783fa1a216aea
decfra-no-restrict-cursor.sh 45776d7f7369df2270530b4adbfd69c3
decfra-restrict-cursor.sh 0a595dc0088097dd235dd5c8801a3eb5
decera-no-restrict-cursor.sh 9d33acf9eca6eed4192e6d7f5104d202
decera-restrict-cursor.sh 89b15109e4e2ade943a2ab3990729931
decera-decfra-extra.sh abfe90a1df148bf15e7bf0d56163c76a
cursor-movements.sh 6b916da9bdb377e199bba69b1efefac6
fonts.sh d0dcea18258b95d5c869aa866fcae10f
cursor-shape-0.sh c91e01b0e859cc043f21d804a01bcd50
cursor-shape-1.sh c91e01b0e859cc043f21d804a01bcd50
cursor-shape-2.sh c91e01b0e859cc043f21d804a01bcd50
cursor-shape-3.sh dc3615ec92c9254cbf6b1deb83c3fda2
cursor-shape-4.sh dc3615ec92c9254cbf6b1deb83c3fda2
cursor-shape-5.sh 21332951c006a2d91cf0f227758ff477
cursor-shape-6.sh 21332951c006a2d91cf0f227758ff477
cursor-shape-7.sh 5d0dadf7273d918cbcd99df95e56795e