Add symbolic link for printf in case of command-not-found

mail6543210 2017-11-22 01:53:46 +08:00
parent 16d3e6d2dc
commit 9352f6913a
1 changed files with 1 additions and 0 deletions

View File

@ -21,6 +21,7 @@ rm -rf "$TEST_DIR"
mkdir "$TEST_DIR" mkdir "$TEST_DIR"
ln -s "$(command which which)" "$TEST_DIR/which" ln -s "$(command which which)" "$TEST_DIR/which"
ln -s "$(command which dirname)" "$TEST_DIR/dirname" ln -s "$(command which dirname)" "$TEST_DIR/dirname"
ln -s "$(command which printf)" "$TEST_DIR/printf"
[ "$(PATH="$TEST_DIR" nvm_ls_current)" = "none" ] || die 'when node not installed, nvm_ls_current did not return "none"' [ "$(PATH="$TEST_DIR" nvm_ls_current)" = "none" ] || die 'when node not installed, nvm_ls_current did not return "none"'
[ "@$(PATH="$TEST_DIR" nvm_ls_current 2> /dev/stdout 1> /dev/null)@" = "@@" ] || die 'when node not installed, nvm_ls_current returned error output' [ "@$(PATH="$TEST_DIR" nvm_ls_current 2> /dev/stdout 1> /dev/null)@" = "@@" ] || die 'when node not installed, nvm_ls_current returned error output'