From dff4f80f325146783162f57f6f26629bf240ef8d Mon Sep 17 00:00:00 2001 From: Luke Childs Date: Sun, 17 Apr 2016 22:26:09 +0100 Subject: [PATCH] Add fast test to check nvm uninstall with file permission error --- ..." with incorrect file permissions fails nicely" | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 "test/fast/Running \"nvm uninstall\" with incorrect file permissions fails nicely" diff --git "a/test/fast/Running \"nvm uninstall\" with incorrect file permissions fails nicely" "b/test/fast/Running \"nvm uninstall\" with incorrect file permissions fails nicely" new file mode 100755 index 0000000..1fad640 --- /dev/null +++ "b/test/fast/Running \"nvm uninstall\" with incorrect file permissions fails nicely" @@ -0,0 +1,14 @@ +#!/bin/sh + +cd ../.. +mkdir v0.0.1 +mkdir src/node-v0.0.1 + +sudo touch v0.0.1/sudo + +. ./nvm.sh + +RETURN_MESSAGE="$(nvm uninstall v0.0.1 2>&1)" +CHECK_FOR="Cannot uninstall, incorrect permissions on installation folder" + +test "${RETURN_MESSAGE#*$CHECK_FOR}" != "$RETURN_MESSAGE" || exit 1