diff --git a/src/bin/termpty.c b/src/bin/termpty.c index 1d51f7be..383f39e4 100644 --- a/src/bin/termpty.c +++ b/src/bin/termpty.c @@ -778,6 +778,9 @@ termpty_new(const char *cmd, Eina_Bool login_shell, const char *cd, putenv("XTERM_256_COLORS=1"); putenv("TERM_PROGRAM=terminology"); putenv("TERM_PROGRAM_VERSION=" PACKAGE_VERSION); +#if defined(ENABLE_TEST_UI) + putenv("IN_TY_TEST_UI=1" PACKAGE_VERSION); +#endif if (window_id) { char buf[256]; diff --git a/tests/da.sh b/tests/da.sh index ae68b991..ed52ee12 100755 --- a/tests/da.sh +++ b/tests/da.sh @@ -1,4 +1,6 @@ #!/bin/sh +# shellcheck source=tests/utils.sh +. "$(dirname "$0")/utils.sh" # fill space with E printf '\033[69;1;1;25;80\044x' @@ -43,4 +45,4 @@ printf '\033[=0c' printf '\033[=42c' # let it print -sleep 0.2 +test_sleep 0.2 diff --git a/tests/dsr-cpr.sh b/tests/dsr-cpr.sh index e1542661..bb751bf8 100755 --- a/tests/dsr-cpr.sh +++ b/tests/dsr-cpr.sh @@ -1,4 +1,6 @@ #!/bin/sh +# shellcheck source=tests/utils.sh +. "$(dirname "$0")/utils.sh" # fill space with E printf '\033#8' @@ -12,7 +14,7 @@ printf '\033[6n' # Request cursor position (dec) printf '\033[?6n' -sleep 0.2 +test_sleep 0.2 # set top/bottom margins: printf '\033[10;20r' @@ -29,7 +31,7 @@ printf '\033[6n' # Request cursor position (dec) printf '\033[?6n' -sleep 0.2 +test_sleep 0.2 # restrict cursor printf '\033[?6h' diff --git a/tests/esc_term_name_version.sh b/tests/esc_term_name_version.sh index 0c9f1ca8..60da0c26 100755 --- a/tests/esc_term_name_version.sh +++ b/tests/esc_term_name_version.sh @@ -1,4 +1,6 @@ #!/bin/sh +# shellcheck source=tests/utils.sh +. "$(dirname "$0")/utils.sh" # fill space with E printf '\033[69;1;1;25;80\044x' @@ -13,7 +15,7 @@ printf '\033[H' printf '\033[>0q' # let it print -sleep 0.2 +test_sleep 0.2 # move printf '\033[2H' @@ -22,4 +24,4 @@ printf '\033[2H' printf '\033[>q' # let it print -sleep 0.2 +test_sleep 0.2 diff --git a/tests/mouse_reporting_mode_all_ext_none.sh b/tests/mouse_reporting_mode_all_ext_none.sh index 24a9185c..8a5a9612 100755 --- a/tests/mouse_reporting_mode_all_ext_none.sh +++ b/tests/mouse_reporting_mode_all_ext_none.sh @@ -1,4 +1,6 @@ #!/bin/sh +# shellcheck source=tests/utils.sh +. "$(dirname "$0")/utils.sh" # char width: 7 # char height: 15 @@ -8,7 +10,7 @@ printf '\033[8;;180;t' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 # fill space with E printf '\033#8' @@ -69,7 +71,7 @@ printf '\033}tm;664;130;0\0' printf '\033}tm;657;130;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## RIGHT CLICK # should print ^[[M"=)^[[MBQ)^[[MBe)^[[M#e) @@ -87,7 +89,7 @@ printf '\033}tm;340;130;0\0' printf '\033}tm;200;130;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## MIDDLE CLICK # should print ^[[M!=)^[[MAe)^[[M#e) @@ -104,7 +106,7 @@ printf '\033}tm;340;130;0\0' printf '\033}tm;200;130;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## WHEEL # prints ^[[M`=)^[[Ma=)^[[M`e)^[[Mae) @@ -117,7 +119,7 @@ printf '\033}tw;480;130;1;1;0\0' printf '\033}tw;480;130;0;1;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## @@ -140,7 +142,7 @@ printf '\033}tm;340;130;1\0' printf '\033}tm;200;130;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## RIGHT CLICK @@ -158,7 +160,7 @@ printf '\033}tm;340;130;1\0' printf '\033}tm;200;130;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## MIDDLE CLICK @@ -176,7 +178,7 @@ printf '\033}tm;340;130;1\0' printf '\033}tm;200;130;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## WHEEL # prints ^[[M`=)^[[Ma=)^[[M`e)^[[Mae) @@ -189,5 +191,5 @@ printf '\033}tw;480;130;1;1;1\0' printf '\033}tw;480;130;0;1;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 printf '\033[14H' diff --git a/tests/mouse_reporting_mode_all_ext_sgr.sh b/tests/mouse_reporting_mode_all_ext_sgr.sh index ee06ccfb..62b1eae6 100755 --- a/tests/mouse_reporting_mode_all_ext_sgr.sh +++ b/tests/mouse_reporting_mode_all_ext_sgr.sh @@ -1,4 +1,6 @@ #!/bin/sh +# shellcheck source=tests/utils.sh +. "$(dirname "$0")/utils.sh" # char width: 7 # char height: 15 @@ -8,7 +10,7 @@ printf '\033[8;;180;t' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 # fill space with E printf '\033#8' @@ -69,7 +71,7 @@ printf '\033}tm;664;130;0\0' printf '\033}tm;657;130;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## RIGHT CLICK # should print @@ -87,7 +89,7 @@ printf '\033}tm;340;130;0\0' printf '\033}tm;200;130;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## MIDDLE CLICK # should print @@ -104,7 +106,7 @@ printf '\033}tm;340;130;0\0' printf '\033}tm;200;130;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## WHEEL # prints ^[[<64;29;9M^[[<65;29;9M^[[<64;69;9M^[[<65;69;9M @@ -117,7 +119,7 @@ printf '\033}tw;480;130;1;1;0\0' printf '\033}tw;480;130;0;1;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## @@ -140,7 +142,7 @@ printf '\033}tm;340;130;1\0' printf '\033}tm;200;130;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## RIGHT CLICK @@ -158,7 +160,7 @@ printf '\033}tm;340;130;1\0' printf '\033}tm;200;130;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## MIDDLE CLICK @@ -176,7 +178,7 @@ printf '\033}tm;340;130;1\0' printf '\033}tm;200;130;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## WHEEL # prints ^[[<72;29;9M^[[<73;29;9M^[[<72;69;9M^[[<73;69;9M @@ -189,5 +191,5 @@ printf '\033}tw;480;130;1;1;1\0' printf '\033}tw;480;130;0;1;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 printf '\033[14H' diff --git a/tests/mouse_reporting_mode_all_ext_urxvt.sh b/tests/mouse_reporting_mode_all_ext_urxvt.sh index b8c8b59f..7323fdef 100755 --- a/tests/mouse_reporting_mode_all_ext_urxvt.sh +++ b/tests/mouse_reporting_mode_all_ext_urxvt.sh @@ -1,4 +1,6 @@ #!/bin/sh +# shellcheck source=tests/utils.sh +. "$(dirname "$0")/utils.sh" # char width: 7 # char height: 15 @@ -8,7 +10,7 @@ printf '\033[8;;180;t' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 # fill space with E printf '\033#8' @@ -69,7 +71,7 @@ printf '\033}tm;664;130;0\0' printf '\033}tm;657;130;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## RIGHT CLICK # should print @@ -87,7 +89,7 @@ printf '\033}tm;340;130;0\0' printf '\033}tm;200;130;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## MIDDLE CLICK # should print @@ -104,7 +106,7 @@ printf '\033}tm;340;130;0\0' printf '\033}tm;200;130;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## WHEEL # prints ^[[96;29;9M^[[97;29;9M^[[96;69;9M^[[97;69;9M @@ -117,7 +119,7 @@ printf '\033}tw;480;130;1;1;0\0' printf '\033}tw;480;130;0;1;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## @@ -140,7 +142,7 @@ printf '\033}tm;340;130;1\0' printf '\033}tm;200;130;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## RIGHT CLICK @@ -158,7 +160,7 @@ printf '\033}tm;340;130;1\0' printf '\033}tm;200;130;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## MIDDLE CLICK @@ -176,7 +178,7 @@ printf '\033}tm;340;130;1\0' printf '\033}tm;200;130;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## WHEEL # prints ^[[104;29;9M^[[105;29;9M^[[104;69;9M^[[105;69;9M @@ -189,5 +191,5 @@ printf '\033}tw;480;130;1;1;1\0' printf '\033}tw;480;130;0;1;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 printf '\033[14H' diff --git a/tests/mouse_reporting_mode_all_ext_utf8.sh b/tests/mouse_reporting_mode_all_ext_utf8.sh index 9005e459..30256ef2 100755 --- a/tests/mouse_reporting_mode_all_ext_utf8.sh +++ b/tests/mouse_reporting_mode_all_ext_utf8.sh @@ -1,4 +1,6 @@ #!/bin/sh +# shellcheck source=tests/utils.sh +. "$(dirname "$0")/utils.sh" # char width: 7 # char height: 15 @@ -8,7 +10,7 @@ printf '\033[8;;180;t' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 # fill space with E printf '\033#8' @@ -69,7 +71,7 @@ printf '\033}tm;664;130;0\0' printf '\033}tm;657;130;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## RIGHT CLICK # should print ^[[M"=)^[[MBQ)^[[MBe)^[[M#e) @@ -87,7 +89,7 @@ printf '\033}tm;340;130;0\0' printf '\033}tm;200;130;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## MIDDLE CLICK # should print ^[[M!=)^[[MAe)^[[M#e) @@ -104,7 +106,7 @@ printf '\033}tm;340;130;0\0' printf '\033}tm;200;130;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## WHEEL # prints ^[[M`=)^[[Ma=)^[[M`e)^[[Mae) @@ -117,7 +119,7 @@ printf '\033}tw;480;130;1;1;0\0' printf '\033}tw;480;130;0;1;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## @@ -140,7 +142,7 @@ printf '\033}tm;340;130;1\0' printf '\033}tm;200;130;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## RIGHT CLICK @@ -158,7 +160,7 @@ printf '\033}tm;340;130;1\0' printf '\033}tm;200;130;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## MIDDLE CLICK @@ -176,7 +178,7 @@ printf '\033}tm;340;130;1\0' printf '\033}tm;200;130;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## WHEEL # prints ^[[M`=)^[[M+e) @@ -189,5 +191,5 @@ printf '\033}tw;480;130;1;1;1\0' printf '\033}tw;480;130;0;1;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 printf '\033[14H' diff --git a/tests/mouse_reporting_mode_mouse_move_pressed_ext_none.sh b/tests/mouse_reporting_mode_mouse_move_pressed_ext_none.sh index 11378c0a..d4dfb06e 100755 --- a/tests/mouse_reporting_mode_mouse_move_pressed_ext_none.sh +++ b/tests/mouse_reporting_mode_mouse_move_pressed_ext_none.sh @@ -1,4 +1,6 @@ #!/bin/sh +# shellcheck source=tests/utils.sh +. "$(dirname "$0")/utils.sh" # char width: 7 # char height: 15 @@ -8,7 +10,7 @@ printf '\033[8;;180;t' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 # fill space with E printf '\033#8' @@ -69,7 +71,7 @@ printf '\033}tm;664;130;0\0' printf '\033}tm;657;130;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## RIGHT CLICK # should print ^[[M"=)^[[MBQ)^[[MBe)^[[M#e) @@ -87,7 +89,7 @@ printf '\033}tm;340;130;0\0' printf '\033}tm;200;130;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## MIDDLE CLICK # should print ^[[M!=)^[[MAe)^[[M#e) @@ -104,7 +106,7 @@ printf '\033}tm;340;130;0\0' printf '\033}tm;200;130;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## WHEEL # prints ^[[M`=)^[[Ma=)^[[M`e)^[[Mae) @@ -117,7 +119,7 @@ printf '\033}tw;480;130;1;1;0\0' printf '\033}tw;480;130;0;1;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## @@ -140,7 +142,7 @@ printf '\033}tm;340;130;1\0' printf '\033}tm;200;130;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## RIGHT CLICK @@ -158,7 +160,7 @@ printf '\033}tm;340;130;1\0' printf '\033}tm;200;130;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## MIDDLE CLICK @@ -176,7 +178,7 @@ printf '\033}tm;340;130;1\0' printf '\033}tm;200;130;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## WHEEL # prints ^[[M`=)^[[M+e) @@ -189,5 +191,5 @@ printf '\033}tw;480;130;1;1;1\0' printf '\033}tw;480;130;0;1;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 printf '\033[14H' diff --git a/tests/mouse_reporting_mode_mouse_move_pressed_ext_sgr.sh b/tests/mouse_reporting_mode_mouse_move_pressed_ext_sgr.sh index 6946d320..5e8dd0f1 100755 --- a/tests/mouse_reporting_mode_mouse_move_pressed_ext_sgr.sh +++ b/tests/mouse_reporting_mode_mouse_move_pressed_ext_sgr.sh @@ -1,4 +1,6 @@ #!/bin/sh +# shellcheck source=tests/utils.sh +. "$(dirname "$0")/utils.sh" # char width: 7 # char height: 15 @@ -8,7 +10,7 @@ printf '\033[8;;180;t' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 # fill space with E printf '\033#8' @@ -69,7 +71,7 @@ printf '\033}tm;664;130;0\0' printf '\033}tm;657;130;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## RIGHT CLICK # should print @@ -87,7 +89,7 @@ printf '\033}tm;340;130;0\0' printf '\033}tm;200;130;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## MIDDLE CLICK # should print @@ -104,7 +106,7 @@ printf '\033}tm;340;130;0\0' printf '\033}tm;200;130;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## WHEEL # prints ^[[<64;29;9M^[[<65;29;9M^[[<64;69;9M^[[<65;69;9M @@ -117,7 +119,7 @@ printf '\033}tw;480;130;1;1;0\0' printf '\033}tw;480;130;0;1;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## @@ -140,7 +142,7 @@ printf '\033}tm;340;130;1\0' printf '\033}tm;200;130;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## RIGHT CLICK @@ -158,7 +160,7 @@ printf '\033}tm;340;130;1\0' printf '\033}tm;200;130;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## MIDDLE CLICK @@ -176,7 +178,7 @@ printf '\033}tm;340;130;1\0' printf '\033}tm;200;130;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## WHEEL # prints ^[[<72;29;9M^[[<73;29;9M^[[<72;69;9M^[[<73;69;9M @@ -189,5 +191,5 @@ printf '\033}tw;480;130;1;1;1\0' printf '\033}tw;480;130;0;1;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 printf '\033[14H' diff --git a/tests/mouse_reporting_mode_mouse_move_pressed_ext_urxvt.sh b/tests/mouse_reporting_mode_mouse_move_pressed_ext_urxvt.sh index a00a12f4..6f8a14f3 100755 --- a/tests/mouse_reporting_mode_mouse_move_pressed_ext_urxvt.sh +++ b/tests/mouse_reporting_mode_mouse_move_pressed_ext_urxvt.sh @@ -1,4 +1,6 @@ #!/bin/sh +# shellcheck source=tests/utils.sh +. "$(dirname "$0")/utils.sh" # char width: 7 # char height: 15 @@ -8,7 +10,7 @@ printf '\033[8;;180;t' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 # fill space with E printf '\033#8' @@ -69,7 +71,7 @@ printf '\033}tm;664;130;0\0' printf '\033}tm;657;130;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## RIGHT CLICK # should print @@ -87,7 +89,7 @@ printf '\033}tm;340;130;0\0' printf '\033}tm;200;130;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## MIDDLE CLICK # should print @@ -104,7 +106,7 @@ printf '\033}tm;340;130;0\0' printf '\033}tm;200;130;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## WHEEL # prints ^[[96;29;9M^[[97;29;9M^[[96;69;9M^[[97;69;9M @@ -117,7 +119,7 @@ printf '\033}tw;480;130;1;1;0\0' printf '\033}tw;480;130;0;1;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## @@ -140,7 +142,7 @@ printf '\033}tm;340;130;1\0' printf '\033}tm;200;130;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## RIGHT CLICK @@ -158,7 +160,7 @@ printf '\033}tm;340;130;1\0' printf '\033}tm;200;130;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## MIDDLE CLICK @@ -176,7 +178,7 @@ printf '\033}tm;340;130;1\0' printf '\033}tm;200;130;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## WHEEL # prints ^[[104;29;9M^[[105;29;9M^[[104;69;9M^[[105;69;9M @@ -189,5 +191,5 @@ printf '\033}tw;480;130;1;1;1\0' printf '\033}tw;480;130;0;1;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 printf '\033[14H' diff --git a/tests/mouse_reporting_mode_mouse_move_pressed_ext_utf8.sh b/tests/mouse_reporting_mode_mouse_move_pressed_ext_utf8.sh index 8051b6ef..bb86f425 100755 --- a/tests/mouse_reporting_mode_mouse_move_pressed_ext_utf8.sh +++ b/tests/mouse_reporting_mode_mouse_move_pressed_ext_utf8.sh @@ -1,4 +1,6 @@ #!/bin/sh +# shellcheck source=tests/utils.sh +. "$(dirname "$0")/utils.sh" # char width: 7 # char height: 15 @@ -8,7 +10,7 @@ printf '\033[8;;180;t' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 # fill space with E printf '\033#8' @@ -69,7 +71,7 @@ printf '\033}tm;664;130;0\0' printf '\033}tm;657;130;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## RIGHT CLICK # should print ^[[M"=)^[[MBQ)^[[MBe)^[[M#e) @@ -87,7 +89,7 @@ printf '\033}tm;340;130;0\0' printf '\033}tm;200;130;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## MIDDLE CLICK # should print ^[[M!=)^[[MAe)^[[M#e) @@ -104,7 +106,7 @@ printf '\033}tm;340;130;0\0' printf '\033}tm;200;130;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## WHEEL # prints ^[[M`=)^[[Ma=)^[[M`e)^[[Mae) @@ -117,7 +119,7 @@ printf '\033}tw;480;130;1;1;0\0' printf '\033}tw;480;130;0;1;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## @@ -140,7 +142,7 @@ printf '\033}tm;340;130;1\0' printf '\033}tm;200;130;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## RIGHT CLICK @@ -158,7 +160,7 @@ printf '\033}tm;340;130;1\0' printf '\033}tm;200;130;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## MIDDLE CLICK @@ -176,7 +178,7 @@ printf '\033}tm;340;130;1\0' printf '\033}tm;200;130;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## WHEEL # prints ^[[M`=)^[[M+e) @@ -189,4 +191,4 @@ printf '\033}tw;480;130;1;1;1\0' printf '\033}tw;480;130;0;1;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 diff --git a/tests/mouse_reporting_mode_normal_ext_none.sh b/tests/mouse_reporting_mode_normal_ext_none.sh index e4887317..d511ed5e 100755 --- a/tests/mouse_reporting_mode_normal_ext_none.sh +++ b/tests/mouse_reporting_mode_normal_ext_none.sh @@ -1,4 +1,6 @@ #!/bin/sh +# shellcheck source=tests/utils.sh +. "$(dirname "$0")/utils.sh" # char width: 7 # char height: 15 @@ -8,7 +10,7 @@ printf '\033[8;;180;t' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 # fill space with E printf '\033#8' @@ -59,7 +61,7 @@ printf '\033}tm;1230;130;0\0' printf '\033}tu;1230;130;1;0;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## RIGHT CLICK # should print ^[[M"=)^[[M#e) @@ -73,7 +75,7 @@ printf '\033}tm;480;130;0\0' printf '\033}tu;480;130;3;0;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## MIDDLE CLICK # should print ^[[M!=)^[[M#e) @@ -87,7 +89,7 @@ printf '\033}tm;480;130;0\0' printf '\033}tu;480;130;2;0;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## WHEEL # prints ^[[M`=)^[[Ma=)^[[M`e)^[[Mae) @@ -100,7 +102,7 @@ printf '\033}tw;480;130;1;1;0\0' printf '\033}tw;480;130;0;1;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## @@ -120,7 +122,7 @@ printf '\033}tm;480;130;1\0' printf '\033}tu;480;130;1;1;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## RIGHT CLICK @@ -135,7 +137,7 @@ printf '\033}tm;480;130;1\0' printf '\033}tu;480;130;3;1;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## MIDDLE CLICK @@ -150,7 +152,7 @@ printf '\033}tm;480;130;1\0' printf '\033}tu;480;130;2;1;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## WHEEL # prints ^[[Mh=)^[[Mi=)^[[Mhe)^[[Mie) @@ -163,4 +165,4 @@ printf '\033}tw;480;130;1;1;1\0' printf '\033}tw;480;130;0;1;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 diff --git a/tests/mouse_reporting_mode_normal_ext_sgr.sh b/tests/mouse_reporting_mode_normal_ext_sgr.sh index 6fdaa84d..c3153e81 100755 --- a/tests/mouse_reporting_mode_normal_ext_sgr.sh +++ b/tests/mouse_reporting_mode_normal_ext_sgr.sh @@ -1,4 +1,6 @@ #!/bin/sh +# shellcheck source=tests/utils.sh +. "$(dirname "$0")/utils.sh" # char width: 7 # char height: 15 @@ -8,7 +10,7 @@ printf '\033[8;;180;t' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 # fill space with E printf '\033#8' @@ -69,7 +71,7 @@ printf '\033}tm;664;130;0\0' printf '\033}tm;657;130;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## RIGHT CLICK # should print ^[[<2;29;9M;^[[<2;69;9m @@ -87,7 +89,7 @@ printf '\033}tm;340;130;0\0' printf '\033}tm;200;130;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## MIDDLE CLICK # should print ^[[<1;29;9M^[[<1;69;9m @@ -104,7 +106,7 @@ printf '\033}tm;340;130;0\0' printf '\033}tm;200;130;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## WHEEL # prints ^[[<64;29;9M^[[<65;29;9M^[[<64;69;9M^[[<65;69;9M @@ -117,7 +119,7 @@ printf '\033}tw;480;130;1;1;0\0' printf '\033}tw;480;130;0;1;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## @@ -140,7 +142,7 @@ printf '\033}tm;340;130;1\0' printf '\033}tm;200;130;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## RIGHT CLICK @@ -158,7 +160,7 @@ printf '\033}tm;340;130;1\0' printf '\033}tm;200;130;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## MIDDLE CLICK @@ -176,7 +178,7 @@ printf '\033}tm;340;130;1\0' printf '\033}tm;200;130;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## WHEEL # prints ^[[<72;29;9M^[[<73;29;9M^[[<72;69;9M^[[<73;69;9M @@ -189,5 +191,5 @@ printf '\033}tw;480;130;1;1;1\0' printf '\033}tw;480;130;0;1;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 printf '\033[14H' diff --git a/tests/mouse_reporting_mode_normal_ext_urxvt.sh b/tests/mouse_reporting_mode_normal_ext_urxvt.sh index 9c91b18f..547e4055 100755 --- a/tests/mouse_reporting_mode_normal_ext_urxvt.sh +++ b/tests/mouse_reporting_mode_normal_ext_urxvt.sh @@ -1,4 +1,6 @@ #!/bin/sh +# shellcheck source=tests/utils.sh +. "$(dirname "$0")/utils.sh" # char width: 7 # char height: 15 @@ -8,7 +10,7 @@ printf '\033[8;;180;t' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 # fill space with E printf '\033#8' @@ -69,7 +71,7 @@ printf '\033}tm;664;130;0\0' printf '\033}tm;657;130;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## RIGHT CLICK # should print ^[[34;29;9M^[[35;29;9M^[[34;69;9M^[[35;69;9M @@ -87,7 +89,7 @@ printf '\033}tm;340;130;0\0' printf '\033}tm;200;130;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## MIDDLE CLICK # should print ^[[33;29;9M^[[35;29;9M^[[33;69;9M^[[35;69;9M @@ -104,7 +106,7 @@ printf '\033}tm;340;130;0\0' printf '\033}tm;200;130;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## WHEEL # prints ^[[96;29;9M^[[97;29;9M^[[96;69;9M^[[97;69;9M @@ -117,7 +119,7 @@ printf '\033}tw;480;130;1;1;0\0' printf '\033}tw;480;130;0;1;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## @@ -140,7 +142,7 @@ printf '\033}tm;340;130;1\0' printf '\033}tm;200;130;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## RIGHT CLICK @@ -158,7 +160,7 @@ printf '\033}tm;340;130;1\0' printf '\033}tm;200;130;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## MIDDLE CLICK @@ -176,7 +178,7 @@ printf '\033}tm;340;130;1\0' printf '\033}tm;200;130;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## WHEEL # prints ^[[104;29;9M^[[105;29;9M^[[104;69;9M^[[105;69;9M @@ -189,5 +191,5 @@ printf '\033}tw;480;130;1;1;1\0' printf '\033}tw;480;130;0;1;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 printf '\033[14H' diff --git a/tests/mouse_reporting_mode_normal_ext_utf8.sh b/tests/mouse_reporting_mode_normal_ext_utf8.sh index 61bcc404..10abadaa 100755 --- a/tests/mouse_reporting_mode_normal_ext_utf8.sh +++ b/tests/mouse_reporting_mode_normal_ext_utf8.sh @@ -1,4 +1,6 @@ #!/bin/sh +# shellcheck source=tests/utils.sh +. "$(dirname "$0")/utils.sh" # char width: 7 # char height: 15 @@ -8,7 +10,7 @@ printf '\033[8;;180;t' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 # fill space with E printf '\033#8' @@ -62,7 +64,7 @@ printf '\033}tm;1230;130;0\0' printf '\033}tu;1230;130;1;0;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## RIGHT CLICK # should print ^[[M"=)^[[M#e) @@ -78,7 +80,7 @@ printf '\033}tu;480;130;3;0;0\0' printf '\033}tm;200;130;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## MIDDLE CLICK # should print ^[[M!=)^[[M#e) @@ -94,7 +96,7 @@ printf '\033}tu;480;130;2;0;0\0' printf '\033}tm;200;130;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## WHEEL # prints ^[[M`=)^[[Ma=)^[[M`e)^[[Mae) @@ -107,7 +109,7 @@ printf '\033}tw;480;130;1;1;0\0' printf '\033}tw;480;130;0;1;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## @@ -129,7 +131,7 @@ printf '\033}tu;480;130;1;1;0\0' printf '\033}tm;200;130;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## RIGHT CLICK @@ -146,7 +148,7 @@ printf '\033}tu;480;130;3;1;0\0' printf '\033}tm;200;130;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## MIDDLE CLICK @@ -163,7 +165,7 @@ printf '\033}tu;480;130;2;1;0\0' printf '\033}tm;200;130;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## WHEEL # prints ^[[Mh=)^[[Mi=)^[[Mhe)^[[Mie) @@ -176,4 +178,4 @@ printf '\033}tw;480;130;1;1;1\0' printf '\033}tw;480;130;0;1;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 diff --git a/tests/mouse_reporting_mode_x10_ext_none.sh b/tests/mouse_reporting_mode_x10_ext_none.sh index 4d86e79a..ea1bf70a 100755 --- a/tests/mouse_reporting_mode_x10_ext_none.sh +++ b/tests/mouse_reporting_mode_x10_ext_none.sh @@ -1,4 +1,6 @@ #!/bin/sh +# shellcheck source=tests/utils.sh +. "$(dirname "$0")/utils.sh" # char width: 7 # char height: 15 @@ -8,7 +10,7 @@ printf '\033[8;;180;t' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 # fill space with E printf '\033#8' @@ -59,7 +61,7 @@ printf '\033}tm;1230;130;0\0' printf '\033}tu;1230;130;1;0;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## RIGHT CLICK # should print ^[[M"=) @@ -73,7 +75,7 @@ printf '\033}tm;480;130;0\0' printf '\033}tu;480;130;3;0;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## MIDDLE CLICK # should print ^[[M!=) @@ -87,7 +89,7 @@ printf '\033}tm;480;130;0\0' printf '\033}tu;480;130;2;0;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## WHEEL # prints nothing @@ -98,7 +100,7 @@ printf '\033}tw;200;130;1;1;0\0' printf '\033}tw;480;130;0;1;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## @@ -118,7 +120,7 @@ printf '\033}tm;480;130;1\0' printf '\033}tu;480;130;1;1;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## RIGHT CLICK @@ -133,7 +135,7 @@ printf '\033}tm;480;130;1\0' printf '\033}tu;480;130;3;1;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## MIDDLE CLICK @@ -148,7 +150,7 @@ printf '\033}tm;480;130;1\0' printf '\033}tu;480;130;2;1;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## WHEEL # prints nothing @@ -161,4 +163,4 @@ printf '\033}tw;480;130;1;1;1\0' printf '\033}tw;480;130;0;1;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 diff --git a/tests/mouse_reporting_mode_x10_ext_sgr.sh b/tests/mouse_reporting_mode_x10_ext_sgr.sh index c57b47d9..0f389007 100755 --- a/tests/mouse_reporting_mode_x10_ext_sgr.sh +++ b/tests/mouse_reporting_mode_x10_ext_sgr.sh @@ -1,4 +1,6 @@ #!/bin/sh +# shellcheck source=tests/utils.sh +. "$(dirname "$0")/utils.sh" # char width: 7 # char height: 15 @@ -8,7 +10,7 @@ printf '\033[8;;180;t' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 # fill space with E printf '\033#8' @@ -69,7 +71,7 @@ printf '\033}tm;664;130;0\0' printf '\033}tm;657;130;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## RIGHT CLICK # should print ^[[<2;29;9M @@ -87,7 +89,7 @@ printf '\033}tm;340;130;0\0' printf '\033}tm;200;130;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## MIDDLE CLICK # should print ^[[<1;29;9M @@ -104,7 +106,7 @@ printf '\033}tm;340;130;0\0' printf '\033}tm;200;130;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## WHEEL # prints nothing @@ -117,7 +119,7 @@ printf '\033}tw;480;130;1;1;0\0' printf '\033}tw;480;130;0;1;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## @@ -140,7 +142,7 @@ printf '\033}tm;340;130;1\0' printf '\033}tm;200;130;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## RIGHT CLICK @@ -158,7 +160,7 @@ printf '\033}tm;340;130;1\0' printf '\033}tm;200;130;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## MIDDLE CLICK @@ -176,7 +178,7 @@ printf '\033}tm;340;130;1\0' printf '\033}tm;200;130;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## WHEEL # prints nothing @@ -189,5 +191,5 @@ printf '\033}tw;480;130;1;1;1\0' printf '\033}tw;480;130;0;1;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 printf '\033[14H' diff --git a/tests/mouse_reporting_mode_x10_ext_urxvt.sh b/tests/mouse_reporting_mode_x10_ext_urxvt.sh index 79e65b66..6e80f617 100755 --- a/tests/mouse_reporting_mode_x10_ext_urxvt.sh +++ b/tests/mouse_reporting_mode_x10_ext_urxvt.sh @@ -1,4 +1,6 @@ #!/bin/sh +# shellcheck source=tests/utils.sh +. "$(dirname "$0")/utils.sh" # char width: 7 # char height: 15 @@ -8,7 +10,7 @@ printf '\033[8;;180;t' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 # fill space with E printf '\033#8' @@ -69,7 +71,7 @@ printf '\033}tm;664;130;0\0' printf '\033}tm;657;130;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## RIGHT CLICK # should print ^[[34;29;9M @@ -87,7 +89,7 @@ printf '\033}tm;340;130;0\0' printf '\033}tm;200;130;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## MIDDLE CLICK # should print ^[[33;29;9M @@ -104,7 +106,7 @@ printf '\033}tm;340;130;0\0' printf '\033}tm;200;130;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## WHEEL # prints nothing @@ -117,7 +119,7 @@ printf '\033}tw;480;130;1;1;0\0' printf '\033}tw;480;130;0;1;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## @@ -140,7 +142,7 @@ printf '\033}tm;340;130;1\0' printf '\033}tm;200;130;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## RIGHT CLICK @@ -158,7 +160,7 @@ printf '\033}tm;340;130;1\0' printf '\033}tm;200;130;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## MIDDLE CLICK @@ -176,7 +178,7 @@ printf '\033}tm;340;130;1\0' printf '\033}tm;200;130;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## WHEEL # prints nothing @@ -189,5 +191,5 @@ printf '\033}tw;480;130;1;1;1\0' printf '\033}tw;480;130;0;1;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 printf '\033[14H' diff --git a/tests/mouse_reporting_mode_x10_ext_utf8.sh b/tests/mouse_reporting_mode_x10_ext_utf8.sh index bc5333c8..113c4d24 100755 --- a/tests/mouse_reporting_mode_x10_ext_utf8.sh +++ b/tests/mouse_reporting_mode_x10_ext_utf8.sh @@ -1,4 +1,6 @@ #!/bin/sh +# shellcheck source=tests/utils.sh +. "$(dirname "$0")/utils.sh" # char width: 7 # char height: 15 @@ -8,7 +10,7 @@ printf '\033[8;;180;t' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 # fill space with E printf '\033#8' @@ -60,7 +62,7 @@ printf '\033}tm;1230;130;0\0' printf '\033}tu;1230;130;1;0;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## RIGHT CLICK # should print ^[[M"=) @@ -74,7 +76,7 @@ printf '\033}tm;480;130;0\0' printf '\033}tu;480;130;3;0;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## MIDDLE CLICK # should print ^[[M!=) @@ -88,7 +90,7 @@ printf '\033}tm;480;130;0\0' printf '\033}tu;480;130;2;0;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## WHEEL # prints nothing @@ -99,7 +101,7 @@ printf '\033}tw;200;130;1;1;0\0' printf '\033}tw;480;130;0;1;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## @@ -119,7 +121,7 @@ printf '\033}tm;480;130;1\0' printf '\033}tu;480;130;1;1;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## RIGHT CLICK @@ -134,7 +136,7 @@ printf '\033}tm;480;130;1\0' printf '\033}tu;480;130;3;1;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## MIDDLE CLICK @@ -149,7 +151,7 @@ printf '\033}tm;480;130;1\0' printf '\033}tu;480;130;2;1;0\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 ## WHEEL # prints nothing @@ -162,4 +164,4 @@ printf '\033}tw;480;130;1;1;1\0' printf '\033}tw;480;130;0;1;1\0' # force render printf '\033}tr\0' -sleep 0.2 +test_sleep 0.2 diff --git a/tests/osc-11-query.sh b/tests/osc-11-query.sh index f26cdf80..334963ea 100755 --- a/tests/osc-11-query.sh +++ b/tests/osc-11-query.sh @@ -1,6 +1,8 @@ #!/bin/sh +# shellcheck source=tests/utils.sh +. "$(dirname "$0")/utils.sh" # query background color printf '\033]11;?\007' -sleep 0.1 +test_sleep 0.1 #should print ^]]11;rgb:83/84/85^G diff --git a/tests/xterm-osc-10.sh b/tests/xterm-osc-10.sh index eae8554b..f0adcea8 100755 --- a/tests/xterm-osc-10.sh +++ b/tests/xterm-osc-10.sh @@ -22,4 +22,3 @@ printf '\033]10;fff000\007' # change foreground color and then query it printf '\033]10;#ff00FF\007' printf '\033]10;?\007' -sleep 0.1 diff --git a/tests/xterm-osc-11.sh b/tests/xterm-osc-11.sh index 1130058e..71ceaffa 100755 --- a/tests/xterm-osc-11.sh +++ b/tests/xterm-osc-11.sh @@ -22,4 +22,3 @@ printf '\033]11;fff000\007' # change background color and then query it printf '\033]11;#ff00FF\007' printf '\033]11;?\007' -sleep 0.1 diff --git a/tests/xterm-osc-12.sh b/tests/xterm-osc-12.sh index 42fbb3a0..1ecd9c11 100755 --- a/tests/xterm-osc-12.sh +++ b/tests/xterm-osc-12.sh @@ -22,4 +22,3 @@ printf '\033]12;fff000\007' # change cursor color and then query it printf '\033]12;#ff00FF\007' printf '\033]12;?\007' -sleep 0.1