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.
This commit is contained in:
Charles LeDoux 2016-06-24 15:06:06 -05:00 committed by Adam Spiers
parent bb8b79e031
commit 048203b7f9

View file

@ -55,7 +55,7 @@ sub init_test_dirs {
} }
# Don't let user's ~/.stow-global-ignore affect test results # Don't let user's ~/.stow-global-ignore affect test results
$ENV{HOME} = '/tmp/fake/home'; $ENV{HOME} = $OUT_DIR;
} }
sub new_Stow { sub new_Stow {