Commit graph

2 commits

Author SHA1 Message Date
Charles LeDoux ebc895a540 Add test for conflicting stowrc and cli args
Why:

* Want to add feature to stowrc parsing.
* Missing regression test for conflicting cli and stowrc options.

This change addresses the need by:

* Add missing regression tests to rc_options.t
    * Two types of tests for the two types of options possible.

* For scalar options such as --target, cli arguments should overwrite
  stowrc arguments.

* For options that result in a list, such as --ignore, the arguments
  from cli and stowrc files should be merged.
2019-06-25 19:38:25 +01:00
Charles LeDoux 237288fb7e Add test harness for stowrc files
Why:

* Planning on developing a new feature for parsing of stowrc files.
* Need a test harness that performs initialization and clean up
    * Initialization: Create directory structure that allows creation of
      stowrc files without worrying about squashing existing files.
    * Clean up: Remove all files created during testing.

This change addresses the need by:

* Add intialization and cleanup harness in t/rc_options.t
    * Define the location to write stowrc files to in $RC_FILE
    * Ensures that location $RC_FILE does not already exist.
    * Calls the init_test_dirs to bootstrap directory tree.
    * After all tests are run, removes $RC_FILE and the testing
      directory tree.

* Add basic test of stowrc parsing to t/rc_options.t
    * Provides a template of how to create and test a stowrc file.

* Newly created t/rc_options.t file added to MANIFEST
2019-06-25 19:38:25 +01:00