From 09db7d5d3f5574794edb02e3f12dcfbdb4c0da40 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Tue, 10 Jul 2018 13:53:40 +0200 Subject: [Tests] Fix window test. --- lexer/theme-lexer.l | 7 +++++-- source/rofi-icon-fetcher.c | 2 +- test/run_window_test.sh | 6 +++++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/lexer/theme-lexer.l b/lexer/theme-lexer.l index dfbb3fd9..385b28b8 100644 --- a/lexer/theme-lexer.l +++ b/lexer/theme-lexer.l @@ -54,7 +54,9 @@ typedef enum { /** Parse a file */ PT_FILE, /** Parse a string */ - PT_STRING + PT_STRING, + /** Parse environment */ + PT_ENV } ParseType; /** @@ -123,6 +125,7 @@ static double rofi_theme_parse_convert_hex ( char high, char low) } \ break;\ }\ + case PT_ENV:\ case PT_STRING:\ {\ yy_size_t len = MIN (max_size, current->str_len);\ @@ -446,7 +449,7 @@ if ( queue == NULL ){ ParseObject *top = g_queue_peek_head ( file_queue ); top->location = *yylloc; ParseObject *po = g_malloc0(sizeof(ParseObject)); - po->type = PT_STRING; + po->type = PT_ENV; po->input_str = val; po->str_len = strlen(val); current = po; diff --git a/source/rofi-icon-fetcher.c b/source/rofi-icon-fetcher.c index 94e3bb8c..0cd8e6ab 100644 --- a/source/rofi-icon-fetcher.c +++ b/source/rofi-icon-fetcher.c @@ -138,7 +138,7 @@ static void rofi_icon_fetcher_worker ( thread_state *sdata, G_GNUC_UNUSED gpoint // as long as dr->icon is updated atomicly.. (is a pointer write atomic?) // this should be fine running in another thread. IconFetcherEntry *sentry = (IconFetcherEntry*) sdata; - const gchar *themes[1] = { + const gchar *themes[] = { config.icon_theme, NULL }; diff --git a/test/run_window_test.sh b/test/run_window_test.sh index 9cd765ff..3d7d0966 100755 --- a/test/run_window_test.sh +++ b/test/run_window_test.sh @@ -29,10 +29,14 @@ if kill ${TPID}; then wait ${TPID} fi -if pgrep -u $USER xterm +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 -- cgit v1.2.3