clipmenu

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

commit 333ebc513da4594be2f990645977d5dcac252938
parent 17823baceadb2d97c0a79ad223c1d5980dc21db0
Author: Chris Down <chris@chrisdown.name>
Date:   Fri, 29 Jan 2021 01:16:45 +0000

clipctl: Fix tests

We now use clipctl in tests and must account for using the local
version.

Diffstat:
Mclipctl | 4++--
Mtests/test-clipmenu | 3++-
2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/clipctl b/clipctl @@ -22,7 +22,7 @@ clipmenud_pid=$(pgrep -u "$(id -u)" -nf 'clipmenud$') case $1 in enable|disable|toggle|status) if [[ -z "$clipmenud_pid" ]]; then - echo "clipmenud is not running" + echo "clipmenud is not running" >&2 exit 2 fi ;; @@ -46,7 +46,7 @@ case $1 in version) echo "$major_version" ;; cache-dir) echo "$cache_dir" ;; *) - printf 'Unknown command: %s\n' "$1" + printf 'Unknown command: %s\n' "$1" >&2 exit 1 ;; esac diff --git a/tests/test-clipmenu b/tests/test-clipmenu @@ -4,7 +4,7 @@ set -x set -e set -o pipefail -dir=$(clipctl cache-dir) +dir=$(./clipctl cache-dir) cache_file=$dir/line_cache if [[ $0 == /* ]]; then @@ -47,6 +47,7 @@ rofi() { alias xsel='shim xsel' alias xclip='shim xclip' +alias clipctl='./clipctl' EOF chmod a+x /tmp/clipmenu