diff options
author | patrick brisbin <pbrisbin@gmail.com> | 2013-08-23 14:31:32 -0400 |
---|---|---|
committer | Mike Burns <mike@mike-burns.com> | 2014-04-08 11:37:36 +0200 |
commit | a5344a3940f292d8d4f8907f92a54bf726b87e44 (patch) | |
tree | 9c6030113ca0db2f83626f4f68857cb0de43f475 /test/mkrc-simple-output.t | |
parent | a7c2b6bed845b8512e878c992e07841ea9b88462 (diff) |
An integration test suite
This test suite uses cram to run integration tests through `/bin/sh`.
The tests are all high-level acceptance tests; they should work
regardless of the implemention code.
To run them, you must first install cram:
sudo pip install cram
Then the `check` target will run them:
make check
Failure output should be printed clearly to stdout, but in general: full
test output is in `test/test-suite.log` and output specific to a test
named `foo.t` is in `foo.t.log`.
Tests are now encouraged in `CONTRIBUTING.md` as part of the normal pull
request process.
This is a TAP-enabled test suite.
Diffstat (limited to 'test/mkrc-simple-output.t')
-rw-r--r-- | test/mkrc-simple-output.t | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/test/mkrc-simple-output.t b/test/mkrc-simple-output.t new file mode 100644 index 0000000..884da01 --- /dev/null +++ b/test/mkrc-simple-output.t @@ -0,0 +1,41 @@ + $ . "$TESTDIR/helper.sh" + +Making an rc file should move it into dotfiles and create a symlink + + $ touch .example + + $ mkrc -v .example + Moving... + '.example' -> '*/.dotfiles/example' (glob) + Linking... + '*/.dotfiles/example' -> '*/.example' (glob) + + $ assert_linked "$HOME/.example" "$HOME/.dotfiles/example" + +Making an rc file in a sub-directory should create the directories then +create a symlink + + $ mkdir .nested + > touch .nested/example + + $ mkrc -v .nested/example + Moving... + '.nested/example' -> '*/.dotfiles/nested/example' (glob) + Linking... + '*/.dotfiles/nested/example' -> '*/.nested/example' (glob) + + $ assert_linked "$HOME/.nested/example" "$HOME/.dotfiles/nested/example" + +Making an rc file in a deeply nested sub-directory should create all of +the required directories then create a symlink + + $ mkdir .nested/deeply + > touch .nested/deeply/example + + $ mkrc -v .nested/deeply/example + Moving... + '.nested/deeply/example' -> '*/.dotfiles/nested/deeply/example' (glob) + Linking... + '*/.dotfiles/nested/deeply/example' -> '*/.nested/deeply/example' (glob) + + $ assert_linked "$HOME/.nested/deeply/example" "$HOME/.dotfiles/nested/deeply/example" |