From 1bd27081c3cc9a9f648c374de547364b7fa85a6a Mon Sep 17 00:00:00 2001 From: Boris Faure Date: Fri, 8 May 2020 16:58:03 +0200 Subject: [PATCH] tests: on true color cache thrashing when new items are added to the cache and entries there are never reused --- tests/tests.results | 1 + tests/true_color_cache_thrashing.sh | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100755 tests/true_color_cache_thrashing.sh diff --git a/tests/tests.results b/tests/tests.results index 7f6a9be6..215585cb 100644 --- a/tests/tests.results +++ b/tests/tests.results @@ -135,3 +135,4 @@ selection_box_scrolls_up.sh c0fc70e8d865236d66edc7ad13af4dbe selection_scrolls_down.sh c0fc70e8d865236d66edc7ad13af4dbe selection_box_scrolls_down.sh c0fc70e8d865236d66edc7ad13af4dbe esc_term_name_version.sh 4498d5f9f7d827bcd46774063510c712 +true_color_cache_thrashing.sh 34df56d44685b91eed2802167f48f3c4 diff --git a/tests/true_color_cache_thrashing.sh b/tests/true_color_cache_thrashing.sh new file mode 100755 index 00000000..a5881d54 --- /dev/null +++ b/tests/true_color_cache_thrashing.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +# fill space with E +printf '\033[69;1;1;25;80\044x' + +#set color +printf '\033[46;31;3m' + +# move +printf '\033[H' + +# 3 loops of 128 colors +for i in $(seq 255); do + printf "\033[48;2;0;%s;%sm " "$i" "$i" +done +for i in $(seq 255); do + printf "\033[48;2;%s;0;%sm " "$i" "$i" +done +for i in $(seq 255); do + printf "\033[48;2;%s;%s;0m " "$i" "$i" +done