diff options
author | Dave Davenport <qball@gmpclient.org> | 2019-02-02 12:35:37 +0100 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2019-02-02 12:35:37 +0100 |
commit | b30b50dc5a2b3eb6b70fa9acfad61ba80254f78d (patch) | |
tree | da0877b92e09c6cd5604eaa0c39487cf9ec380fa | |
parent | 83995a738a27341f348138c4dbf9bf6aa59a4460 (diff) |
[Scripts] Do some fixes.
-rwxr-xr-x | Examples/rofi-file-browser.sh | 2 | ||||
-rwxr-xr-x | test/run_dmenu_custom_test.sh | 2 | ||||
-rwxr-xr-x | test/run_dmenu_empty.sh | 2 | ||||
-rwxr-xr-x | test/run_dmenu_normal_window_test.sh | 2 | ||||
-rwxr-xr-x | test/run_issue333_test.sh | 2 | ||||
-rwxr-xr-x | test/run_script_test.sh | 2 |
6 files changed, 6 insertions, 6 deletions
diff --git a/Examples/rofi-file-browser.sh b/Examples/rofi-file-browser.sh index 397a5dfe..bdb0862e 100755 --- a/Examples/rofi-file-browser.sh +++ b/Examples/rofi-file-browser.sh @@ -64,7 +64,7 @@ then sed -i "s|${ROFI_FB_CUR_DIR}|##deleted##|g" "${ROFI_FB_HISTORY_FILE}" sed -i '/##deleted##/d' "${ROFI_FB_HISTORY_FILE}" echo "${ROFI_FB_CUR_DIR}" >> "${ROFI_FB_HISTORY_FILE}" - if [ $(cat "${ROFI_FB_HISTORY_FILE}" | wc -l) -gt ${ROFI_FB_HISTORY_MAXCOUNT} ] + if [ $( wc -l < "${ROFI_FB_HISTORY_FILE}" ) -gt ${ROFI_FB_HISTORY_MAXCOUNT} ] then sed -i 1d "${ROFI_FB_HISTORY_FILE}" fi diff --git a/test/run_dmenu_custom_test.sh b/test/run_dmenu_custom_test.sh index 07e60fc1..fd36de3a 100755 --- a/test/run_dmenu_custom_test.sh +++ b/test/run_dmenu_custom_test.sh @@ -23,7 +23,7 @@ xdotool key Return # Get result, kill xvfb wait ${RPID} RETV=$? -OUTPUT=$(cat output.txt | tr '\n' ' ') +OUTPUT=$( tr '\n' ' ' < output.txt ) if [ "${OUTPUT}" != 'coffee ' ] then exit 1 diff --git a/test/run_dmenu_empty.sh b/test/run_dmenu_empty.sh index fc0ebf54..a7d82bd9 100755 --- a/test/run_dmenu_empty.sh +++ b/test/run_dmenu_empty.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -cat /dev/null | rofi -dmenu & +rofi -dmenu & < /dev/null RPID=$! sleep 4 xdotool key Return diff --git a/test/run_dmenu_normal_window_test.sh b/test/run_dmenu_normal_window_test.sh index 6f36dc16..72e37aad 100755 --- a/test/run_dmenu_normal_window_test.sh +++ b/test/run_dmenu_normal_window_test.sh @@ -24,7 +24,7 @@ then echo "thread apply all bt" | gdb rofi core.* fi -OUTPUT=$(cat output.txt | tr '\n' ' ') +OUTPUT=$( tr '\n' ' ' < output.txt ) if [ "${OUTPUT}" != 'noot mies ' ] then echo "Got: '${OUTPUT}' expected 'noot mies '" diff --git a/test/run_issue333_test.sh b/test/run_issue333_test.sh index ca2a90de..8b32f387 100755 --- a/test/run_issue333_test.sh +++ b/test/run_issue333_test.sh @@ -21,7 +21,7 @@ xdotool key Escape # Get result, kill xvfb wait ${RPID} RETV=$? -OUTPUT=$(cat output.txt | tr '\n' ' ') +OUTPUT=$(tr '\n' ' ' < output.txt) if [ "${OUTPUT}" != '' ] then echo "Got: '${OUTPUT}' expected nothing" diff --git a/test/run_script_test.sh b/test/run_script_test.sh index dc8fa4d4..f0eb99fb 100755 --- a/test/run_script_test.sh +++ b/test/run_script_test.sh @@ -17,7 +17,7 @@ xdotool key Return # Get result, kill xvfb wait ${RPID} RETV=$? -OUTPUT=$(cat output.txt | tr '\n' ' ') +OUTPUT=$( tr '\n' ' ' < output.txt ) echo ${OUTPUT} if [ "${OUTPUT}" != 'noot ' ] then |