summaryrefslogtreecommitdiff
path: root/test/mkrc-simple-output.t
diff options
context:
space:
mode:
Diffstat (limited to 'test/mkrc-simple-output.t')
-rw-r--r--test/mkrc-simple-output.t20
1 files changed, 17 insertions, 3 deletions
diff --git a/test/mkrc-simple-output.t b/test/mkrc-simple-output.t
index 884da01..c18886c 100644
--- a/test/mkrc-simple-output.t
+++ b/test/mkrc-simple-output.t
@@ -6,7 +6,7 @@ Making an rc file should move it into dotfiles and create a symlink
$ mkrc -v .example
Moving...
- '.example' -> '*/.dotfiles/example' (glob)
+ '*/.example' -> '*/.dotfiles/example' (glob)
Linking...
'*/.dotfiles/example' -> '*/.example' (glob)
@@ -20,7 +20,7 @@ create a symlink
$ mkrc -v .nested/example
Moving...
- '.nested/example' -> '*/.dotfiles/nested/example' (glob)
+ '*/.nested/example' -> '*/.dotfiles/nested/example' (glob)
Linking...
'*/.dotfiles/nested/example' -> '*/.nested/example' (glob)
@@ -34,8 +34,22 @@ the required directories then create a symlink
$ mkrc -v .nested/deeply/example
Moving...
- '.nested/deeply/example' -> '*/.dotfiles/nested/deeply/example' (glob)
+ '*/.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"
+
+Making a relative rc file being in a sub-directory should move into dotfiles
+preserving the full path then symlink
+
+ $ touch .nested/deeply/another_example
+ > cd .nested/deeply
+
+ $ mkrc -v another_example
+ Moving...
+ '*/.nested/deeply/another_example' -> '*/.dotfiles/nested/deeply/another_example' (glob)
+ Linking...
+ '*/.dotfiles/nested/deeply/another_example' -> '*/.nested/deeply/another_example' (glob)
+
+ $ assert_linked "$HOME/.nested/deeply/another_example" "$HOME/.dotfiles/nested/deeply/another_example"