tests: Bugfix: 11-goto.t: use mktemp for generating a random mark, not base64

The base64 string could contain / and + which is treated specially since we
implemented PCRE support :)
This commit is contained in:
Michael Stapelberg 2011-09-24 15:56:43 +01:00
parent 761dac5514
commit 10a9d2a439

View File

@ -2,12 +2,7 @@
# vim:ts=4:sw=4:expandtab # vim:ts=4:sw=4:expandtab
use i3test; use i3test;
use X11::XCB qw(:all); use File::Temp;
use Digest::SHA1 qw(sha1_base64);
BEGIN {
use_ok('X11::XCB::Connection') or BAIL_OUT('Cannot load X11::XCB::Connection');
}
my $x = X11::XCB::Connection->new; my $x = X11::XCB::Connection->new;
@ -45,7 +40,7 @@ is($focus, $mid->id, "Middle window focused");
# Now goto a mark which does not exist # Now goto a mark which does not exist
##################################################################### #####################################################################
my $random_mark = sha1_base64(rand()); my $random_mark = mktemp('mark.XXXXXX');
$focus = focus_after(qq|[con_mark="$random_mark"] focus|); $focus = focus_after(qq|[con_mark="$random_mark"] focus|);
is($focus, $mid->id, "focus unchanged"); is($focus, $mid->id, "focus unchanged");