Description: use tmpdir for tests instead of polluting $HOME;
             also, if $HOME doesn't exist, the tests segfault.
             discovered by Niko Tyni in #525534
Forwarded: no
Author: gregor herrmann <gregoa@debian.org>
Last-Update: 2011-06-06

--- a/t/GtkMozEmbed.t
+++ b/t/GtkMozEmbed.t
@@ -8,14 +8,18 @@
 use Gtk2 -init;
 use Gtk2::MozEmbed;
 
+use File::Spec;
+use File::Path;
+
 use Test::More tests => 8;
 
 # These cause an abort:
 # Gtk2::MozEmbed -> push_startup();
 # Gtk2::MozEmbed -> pop_startup();
 
-Gtk2::MozEmbed -> set_comp_path($ENV{ HOME });
-Gtk2::MozEmbed -> set_profile_path($ENV{ HOME } . "/.Schmuh", "Schmuh");
+my $HOME = File::Spec->tmpdir();
+Gtk2::MozEmbed -> set_comp_path($HOME);
+Gtk2::MozEmbed -> set_profile_path($HOME . "/.Schmuh", "Schmuh");
 
 my $moz = Gtk2::MozEmbed -> new();
 isa_ok($moz, "Gtk2::MozEmbed");
@@ -54,3 +58,5 @@
 
 # my $single = Gtk2::MozEmbedSingle -> new();
 # isa_ok($single, "Gtk2::MozEmbedSingle");
+
+rmtree($HOME . "/.Schmuh");
