Skip to content

Commit

Permalink
tests: Add test for INCR support
Browse files Browse the repository at this point in the history
  • Loading branch information
cdown committed Nov 9, 2024
1 parent 4797cf2 commit 43400ba
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/x_integration_tests
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ settle() {
sleep 0.2
}

long_settle() {
sleep 2
}

check_nr_clips() {
if [[ $SELECT ]]; then
clipmenu
Expand Down Expand Up @@ -164,6 +168,21 @@ clipctl toggle
clipctl toggle
[[ "$(clipctl status)" == enabled ]]

# Test INCR support
set +x
printf '%.0sa' {1..9999999} | xsel -p
set -x
long_settle # This is a big one, give it some time
len_before=$(xsel -po | wc -c)
check_nr_clips 5
SELECT='[5] aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...' \
clipmenu
long_settle
len_after=$(xsel -po | wc -c)

# Make sure we got the whole thing
(( len_before == len_after ))

if (( _UNSHARED )); then
umount -l /tmp
fi

0 comments on commit 43400ba

Please sign in to comment.