From 5dda313447496baf6899e2ba1fb410e049d15e30 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Sat, 23 Jan 2021 19:45:47 +0100 Subject: Fix tests. --- doc/default_theme.rasi | 49 ++++++++++++++++++++++-------------------- include/theme.h | 6 ------ test/convert_old_theme_test.sh | 15 ------------- test/run_all_tests.sh | 2 -- test/run_window_test.sh | 46 --------------------------------------- 5 files changed, 26 insertions(+), 92 deletions(-) delete mode 100755 test/convert_old_theme_test.sh delete mode 100755 test/run_window_test.sh diff --git a/doc/default_theme.rasi b/doc/default_theme.rasi index b377e688..c134e98b 100644 --- a/doc/default_theme.rasi +++ b/doc/default_theme.rasi @@ -9,27 +9,27 @@ urgent-foreground: var(red); alternate-urgent-background: var(lightbg); lightbg: rgba ( 238, 232, 213, 100 % ); - spacing: 2; + background-color: rgba ( 0, 0, 0, 0 % ); border-color: var(foreground); normal-background: var(background); - background-color: rgba ( 0, 0, 0, 0 % ); + selected-urgent-background: var(red); alternate-active-background: var(lightbg); - active-foreground: var(blue); + spacing: 2; blue: rgba ( 38, 139, 210, 100 % ); - urgent-background: var(background); alternate-normal-foreground: var(foreground); - selected-active-background: var(blue); - background: rgba ( 253, 246, 227, 100 % ); + urgent-background: var(background); selected-normal-foreground: var(lightbg); + active-foreground: var(blue); + background: rgba ( 253, 246, 227, 100 % ); + selected-active-background: var(blue); active-background: var(background); - alternate-active-foreground: var(blue); + selected-normal-background: var(lightfg); alternate-normal-background: var(lightbg); foreground: rgba ( 0, 43, 54, 100 % ); - selected-urgent-background: var(red); selected-urgent-foreground: var(background); normal-foreground: var(foreground); alternate-urgent-foreground: var(red); - selected-normal-background: var(lightfg); + alternate-active-foreground: var(blue); } element { padding: 1px ; @@ -74,8 +74,8 @@ element alternate.active { } element-text { background-color: rgba ( 0, 0, 0, 0 % ); - text-color: inherit; highlight: inherit; + text-color: inherit; } element-icon { background-color: rgba ( 0, 0, 0, 0 % ); @@ -85,8 +85,8 @@ element-icon { window { padding: 5; background-color: var(background); + width: 50.0000% ; border: 1; - width: 50%; } mainbox { padding: 0; @@ -127,31 +127,34 @@ button selected { background-color: var(selected-normal-background); text-color: var(selected-normal-foreground); } - -num-filtered-rows, num-rows { - text-color: grey; - expand: false; +num-filtered-rows { + expand: false; + text-color: rgba ( 128, 128, 128, 100 % ); +} +num-rows { + expand: false; + text-color: rgba ( 128, 128, 128, 100 % ); } textbox-num-sep { - text-color: grey; - expand: false; - str: "/"; + expand: false; + str: "/"; + text-color: rgba ( 128, 128, 128, 100 % ); } inputbar { padding: 1px ; spacing: 0px ; text-color: var(normal-foreground); - children: [ prompt,textbox-prompt-colon,entry, num-filtered-rows, textbox-num-sep, num-rows, case-indicator ]; + children: [ prompt,textbox-prompt-colon,entry,num-filtered-rows,textbox-num-sep,num-rows,case-indicator ]; } case-indicator { spacing: 0; text-color: var(normal-foreground); } entry { - spacing: 0; - text-color: var(normal-foreground); - placeholder-color: grey; - placeholder: "Type to filter"; + text-color: var(normal-foreground); + spacing: 0; + placeholder-color: rgba ( 128, 128, 128, 100 % ); + placeholder: "Type to filter"; } prompt { spacing: 0; diff --git a/include/theme.h b/include/theme.h index 28dd0982..54b699f4 100644 --- a/include/theme.h +++ b/include/theme.h @@ -343,12 +343,6 @@ gboolean rofi_theme_is_empty ( void ); * Reset the current theme. */ void rofi_theme_reset ( void ); -#ifdef THEME_CONVERTER -/** - * Convert old theme colors into default one. - */ -void rofi_theme_convert_old ( void ); -#endif /** * @param file File name passed to option. diff --git a/test/convert_old_theme_test.sh b/test/convert_old_theme_test.sh deleted file mode 100755 index 52bbc6a7..00000000 --- a/test/convert_old_theme_test.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash - -TOP_DIR=$1 - -xrdb -retain -load ${TOP_DIR}/doc/old-theme-convert-input.theme -rofi -config ${TOP_DIR}/doc/old-theme-convert-input.theme -dump-theme | grep -v "Rofi version" > temp.txt - -if ! diff temp.txt ${TOP_DIR}/doc/old-theme-convert-output.rasi > /dev/null -then - echo "Convert default theme failed" - diff temp.txt ${TOP_DIR}/doc/old-theme-convert-output.rasi - exit 1; -fi - -exit ${RETV} diff --git a/test/run_all_tests.sh b/test/run_all_tests.sh index b2f11b9f..b228c666 100755 --- a/test/run_all_tests.sh +++ b/test/run_all_tests.sh @@ -19,9 +19,7 @@ tests=( run_issue333_test help_output_test default_theme_test - convert_old_theme_test run_dmenu_normal_window_test - run_window_test ) cd ${MESON_BUILD_ROOT} diff --git a/test/run_window_test.sh b/test/run_window_test.sh deleted file mode 100755 index 3d7d0966..00000000 --- a/test/run_window_test.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env bash - -# wait till it is up, run rofi with error message -sleep 1; -xterm -T MonkeySee sh & -XPID=$! -echo "Started MonkeySee xterm: pid ${XPID}" -sleep 1; -xterm -T TermUnwanted sh & -TPID=$! -echo "Started TermUnwanted xterm: pid ${TPID}" -sleep 1; -rofi -modi window -show window > output.txt & -RPID=$! -echo "Started rofi: pid ${RPID}" - -# send enter. -sleep 5; -xdotool type 'MonkeySee' -sleep 0.4 -xdotool key Return -sleep 1; -xdotool key Ctrl+d -sleep 1; - -echo -n "Killing TermUnwanted: " -if kill ${TPID}; then - echo "done" - wait ${TPID} -fi - -if ps -q ${XPID} # pgrep -u $USER xterm -then - echo "Found remaining xterms: $(pgrep -u $USER xterm)" - kill ${XPID} -fi -if ps -q ${RPID} -then - echo "Rofi still running" - kill ${RPID} - exit 1 -fi -# Get result, kill xvfb -wait ${RPID} -RETV=$? -exit ${RETV} -- cgit v1.2.3