billiob pushed a commit to branch master.

http://git.enlightenment.org/apps/terminology.git/commit/?id=ce07e811808f6a877f960cae09a2ae4251e1aa54

commit ce07e811808f6a877f960cae09a2ae4251e1aa54
Author: Boris Faure <[email protected]>
Date:   Mon Nov 26 22:58:25 2018 +0100

    tests: on cursor shapes and regen tests.results
---
 src/bin/tyfuzz.c        | 24 +++++++++++++++++++++++-
 tests/cursor-shape-0.sh |  2 ++
 tests/cursor-shape-1.sh |  2 ++
 tests/cursor-shape-2.sh |  2 ++
 tests/cursor-shape-3.sh |  2 ++
 tests/cursor-shape-4.sh |  2 ++
 tests/cursor-shape-5.sh |  2 ++
 tests/cursor-shape-6.sh |  2 ++
 tests/cursor-shape-7.sh |  2 ++
 tests/tests.results     | 22 +++++++++++++++-------
 10 files changed, 54 insertions(+), 8 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);
 
diff --git a/tests/cursor-shape-0.sh b/tests/cursor-shape-0.sh
new file mode 100755
index 0000000..2c29d38
--- /dev/null
+++ b/tests/cursor-shape-0.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+printf '\033[0 q'
diff --git a/tests/cursor-shape-1.sh b/tests/cursor-shape-1.sh
new file mode 100755
index 0000000..17869f1
--- /dev/null
+++ b/tests/cursor-shape-1.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+printf '\033[1 q'
diff --git a/tests/cursor-shape-2.sh b/tests/cursor-shape-2.sh
new file mode 100755
index 0000000..594c354
--- /dev/null
+++ b/tests/cursor-shape-2.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+printf '\033[2 q'
diff --git a/tests/cursor-shape-3.sh b/tests/cursor-shape-3.sh
new file mode 100755
index 0000000..f53f12b
--- /dev/null
+++ b/tests/cursor-shape-3.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+printf '\033[3 q'
diff --git a/tests/cursor-shape-4.sh b/tests/cursor-shape-4.sh
new file mode 100755
index 0000000..785a1b5
--- /dev/null
+++ b/tests/cursor-shape-4.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+printf '\033[4 q'
diff --git a/tests/cursor-shape-5.sh b/tests/cursor-shape-5.sh
new file mode 100755
index 0000000..b140148
--- /dev/null
+++ b/tests/cursor-shape-5.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+printf '\033[5 q'
diff --git a/tests/cursor-shape-6.sh b/tests/cursor-shape-6.sh
new file mode 100755
index 0000000..543c7f4
--- /dev/null
+++ b/tests/cursor-shape-6.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+printf '\033[6 q'
diff --git a/tests/cursor-shape-7.sh b/tests/cursor-shape-7.sh
new file mode 100755
index 0000000..a6cc4b3
--- /dev/null
+++ b/tests/cursor-shape-7.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+printf '\033[7 q'
diff --git a/tests/tests.results b/tests/tests.results
index fa5a886..12ca893 100644
--- a/tests/tests.results
+++ b/tests/tests.results
@@ -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

-- 


Reply via email to