From 048203b7f9808acbaec10acbd5892104d3129760 Mon Sep 17 00:00:00 2001 From: Charles LeDoux Date: Fri, 24 Jun 2016 15:06:06 -0500 Subject: [PATCH] Change init_test_dirs to point $HOME at $OUT_DIRS Why: * Want to add a new feature to parsing of stowrc files. * Need ability to write .stowrc files for testing without risk of squashing existing files. This change addresses the need by: * Reusing logic in init_test_dirs * init_test_dirs already creates new directory structure and overwrites $HOME to point into /tmp. * This commit changes init_test_dirs to point $HOME at the newly created directory structure ($OUT_DIR) instead of /tmp. * Grants ability to write .stowrc to $HOME without fear. * Pointing $HOME at $OUT_DIR instead of /tmp also makes cleanup easier. * Remove $OUT_DIR vs remove specific files in /tmp. --- t/testutil.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/testutil.pm b/t/testutil.pm index 1e73dfe..a9d673f 100755 --- a/t/testutil.pm +++ b/t/testutil.pm @@ -55,7 +55,7 @@ sub init_test_dirs { } # Don't let user's ~/.stow-global-ignore affect test results - $ENV{HOME} = '/tmp/fake/home'; + $ENV{HOME} = $OUT_DIR; } sub new_Stow {