diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/Makefile.am | 1 | ||||
-rw-r--r-- | test/lsrc-host-tags-default.t | 17 | ||||
-rw-r--r-- | test/lsrc-hostname.t | 4 | ||||
-rw-r--r-- | test/lsrc-tags.t | 2 | ||||
-rw-r--r-- | test/rcrc-hostname.t | 4 |
5 files changed, 23 insertions, 5 deletions
diff --git a/test/Makefile.am b/test/Makefile.am index 065b2d1..4c5e059 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -8,6 +8,7 @@ TESTS = \ lsrc-tags.t \ lsrc-usage.t \ lsrc-undotted.t \ + lsrc-host-tags-default.t \ mkrc-alternate-dotfiles-dir.t \ mkrc-copy-file.t \ mkrc-host-file.t \ diff --git a/test/lsrc-host-tags-default.t b/test/lsrc-host-tags-default.t new file mode 100644 index 0000000..aa9a253 --- /dev/null +++ b/test/lsrc-host-tags-default.t @@ -0,0 +1,17 @@ + $ . "$TESTDIR/helper.sh" + +Hosts override tags override defaults + + $ touch .dotfiles/host-example + > touch .dotfiles/tag-example + > touch .dotfiles/default-example + > mkdir .dotfiles/tag-firetruck + > touch .dotfiles/tag-firetruck/host-example + > touch .dotfiles/tag-firetruck/tag-example + > mkdir .dotfiles/host-eggplant + > touch .dotfiles/host-eggplant/host-example + + $ lsrc -B eggplant -t firetruck + /*/.host-example:/*/.dotfiles/host-eggplant/host-example (glob) + /*/.tag-example:/*/.dotfiles/tag-firetruck/tag-example (glob) + /*/.default-example:/*/.dotfiles/default-example (glob) diff --git a/test/lsrc-hostname.t b/test/lsrc-hostname.t index 35ad0fe..a69808d 100644 --- a/test/lsrc-hostname.t +++ b/test/lsrc-hostname.t @@ -9,9 +9,9 @@ Should include entries that match hostname > touch .dotfiles/host-not-hostname/nh-example $ lsrc - /*/.example:/*/.dotfiles/example (glob) /*/.h-example:/*/.dotfiles/host-*/h-example (glob) + /*/.example:/*/.dotfiles/example (glob) $ lsrc -B not-hostname - /*/.example:/*/.dotfiles/example (glob) /*/.nh-example:/*/.dotfiles/host-*/nh-example (glob) + /*/.example:/*/.dotfiles/example (glob) diff --git a/test/lsrc-tags.t b/test/lsrc-tags.t index 97f77db..4913daf 100644 --- a/test/lsrc-tags.t +++ b/test/lsrc-tags.t @@ -9,6 +9,6 @@ Should include entries that match passed tags > touch .dotfiles/tag-bar/b-example $ lsrc -t foo -t bar - /*/.example:/*/.dotfiles/example (glob) /*/.f-example:/*/.dotfiles/tag-foo/f-example (glob) /*/.b-example:/*/.dotfiles/tag-bar/b-example (glob) + /*/.example:/*/.dotfiles/example (glob) diff --git a/test/rcrc-hostname.t b/test/rcrc-hostname.t index 1008cd9..f2ad722 100644 --- a/test/rcrc-hostname.t +++ b/test/rcrc-hostname.t @@ -13,9 +13,9 @@ The hostname can be set in ~/.rcrc $ echo 'HOSTNAME="eggplant_firetruck"' > $HOME/.rcrc $ lsrc - /*/.example:/*/.dotfiles/example (glob) /*/.nh-example:/*/.dotfiles/host-eggplant_firetruck/nh-example (glob) + /*/.example:/*/.dotfiles/example (glob) $ lsrc -B haircut_hammer - /*/.example:/*/.dotfiles/example (glob) /*/.nh-example:/*/.dotfiles/host-haircut_hammer/nh-example (glob) + /*/.example:/*/.dotfiles/example (glob) |