diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/rcup-spaces.t | 10 | ||||
-rw-r--r-- | test/rcup-standalone.t | 7 |
2 files changed, 13 insertions, 4 deletions
diff --git a/test/rcup-spaces.t b/test/rcup-spaces.t new file mode 100644 index 0000000..00c50be --- /dev/null +++ b/test/rcup-spaces.t @@ -0,0 +1,10 @@ + $ . "$TESTDIR/helper.sh" + +Should create symlinks for files in directories with whitespace in their names + + $ mkdir .dotfiles/sub\ dir + > touch .dotfiles/sub\ dir/example + + $ rcup >/dev/null + + $ assert_linked "$HOME/.sub dir/example" "$HOME/.dotfiles/sub dir/example" diff --git a/test/rcup-standalone.t b/test/rcup-standalone.t index 7dd3b58..18ec36c 100644 --- a/test/rcup-standalone.t +++ b/test/rcup-standalone.t @@ -12,7 +12,7 @@ # # sh install.sh # - # Environment variables: VERBOSE, CP, LN, MKDIR, RM, DIRNAME, XARGS. + # Environment variables: VERBOSE, CP, LN, MKDIR, RM, DIRNAME. # # env VERBOSE=1 sh install.sh # @@ -30,7 +30,6 @@ : ${MKDIR:=/bin/mkdir} : ${RM:=/bin/rm} : ${DIRNAME:=/usr/bin/dirname} - : ${XARGS:=/usr/bin/xargs} verbose() { if [ "$VERBOSE" -gt 0 ]; then echo "$@" @@ -51,7 +50,7 @@ esac fi verbose "'$1' -> '$2'" - $DIRNAME "$2" | $XARGS $MKDIR -p + $MKDIR -p "$($DIRNAME "$2")" $CP -R "$1" "$2" } handle_file_ln() { @@ -69,7 +68,7 @@ esac fi verbose "'$1' -> '$2'" - $DIRNAME "$2" | $XARGS $MKDIR -p + $MKDIR -p "$($DIRNAME "$2")" $LN -sf "$1" "$2" } handle_file_ln "*eggplant_firetruck/lampshade/bottle" "*.eggplant_firetruck/lampshade/bottle" (glob) |