clipmenu

Simple clipboard management using dmenu
git clone https://git.sinitax.com/cdown/clipmenu
Log | Files | Refs | README | LICENSE | sfeed.txt

commit 33b0e13404a921609d79084fd6191f2b76a161a6
parent 7d9c46a370e59adbda8d7f1e74177bd203881ef4
Author: Chris Down <chris@chrisdown.name>
Date:   Sun, 19 Mar 2017 09:54:56 +0000

Test CM_LAUNCHER

Diffstat:
Mtests/test-clipmenu | 13++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/tests/test-clipmenu b/tests/test-clipmenu @@ -67,12 +67,10 @@ EOF ### TESTS ### -output=$(/tmp/clipmenu --foo bar 2>&1) - temp=$(mktemp) trap 'rm -f -- "$temp"' EXIT -printf '%s\n' "$output" > "$temp" +/tmp/clipmenu --foo bar > "$temp" 2>&1 # Arguments are transparently passed to dmenu grep -Fxq 'dmenu args: -l 8 --foo bar' "$temp" @@ -82,8 +80,13 @@ grep -Fxq 'dmenu line 1 stdin: Selected text 2. (2 lines)' "$temp" grep -Fxq 'dmenu line 2 stdin: Selected text. (2 lines)' "$temp" # xsel should copy both to clipboard *and* primary -grep -Fxq 'xsel args: --logfile /dev/null -i --clipboard' "$temp" -grep -Fxq 'xsel args: --logfile /dev/null -i --primary' "$temp" +grep -Fxq 'xsel args: --logfile /dev/stderr -i --clipboard' "$temp" +grep -Fxq 'xsel args: --logfile /dev/stderr -i --primary' "$temp" grep -Fxq 'xsel line 1 stdin: Selected text.' "$temp" grep -Fxq "xsel line 2 stdin: Yes, it's selected text." "$temp" + +CM_LAUNCHER=rofi /tmp/clipmenu --foo bar > "$temp" 2>&1 + +# We have a special case to add -dmenu for rofi +grep -Fxq 'rofi args: -l 8 -dmenu --foo bar' "$temp"