summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2018-07-10 13:53:40 +0200
committerDave Davenport <qball@gmpclient.org>2018-07-10 13:53:40 +0200
commit09db7d5d3f5574794edb02e3f12dcfbdb4c0da40 (patch)
treec728055f56b575494e371b90924ffb9f4ee6dabc
parentdd0ae5bda0176d1da9475659e5f137f0f21a9719 (diff)
[Tests] Fix window test.
-rw-r--r--lexer/theme-lexer.l7
-rw-r--r--source/rofi-icon-fetcher.c2
-rwxr-xr-xtest/run_window_test.sh6
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