1#!/usr/bin/perl 2# prove that Clipboard::Xclip will dig around through the selections until it 3# finds something. 4use strict; 5use warnings; 6 7use lib 'lib'; 8use Clipboard; 9use Test::More 'no_plan'; 10 11for (Clipboard::Xclip->all_selections) { 12 my $str = "$_ paste worked\n\nwith double-newlines, even."; 13 Clipboard::Xclip->copy_to_selection($_, $str); 14 my $actual = Clipboard->paste; 15 is $actual, $str, "$_ test"; 16 Clipboard::Xclip->copy_to_selection($_, ''); 17} 18