From 52a384a0cc3821f8661d0130473f3df2698a5eec Mon Sep 17 00:00:00 2001 From: Koen Punt Date: Sat, 22 Mar 2014 18:37:41 +0100 Subject: [PATCH 1/2] Add Makefile for multishell testing updated nvm current test for zsh --- .travis.yml | 2 +- Makefile | 15 +++++++++++++++ ...ent\" should display current nvm environment." | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 Makefile diff --git a/.travis.yml b/.travis.yml index dba0355..d967767 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,4 +2,4 @@ language: bash before_script: - curl -o /tmp/urchin https://raw.github.com/scraperwiki/urchin/master/urchin && chmod +x /tmp/urchin script: - - NVM_DIR=$TRAVIS_BUILD_DIR /tmp/urchin test \ No newline at end of file + - NVM_DIR=$TRAVIS_BUILD_DIR make URCHIN=/tmp/urchin test \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8f21aaf --- /dev/null +++ b/Makefile @@ -0,0 +1,15 @@ +URCHIN=`which urchin` +SHELLS=sh bash dash ksh zsh + +.PHONY: $(SHELLS) test + +fast: $(SHELLS) + +$(SHELLS): + @printf '\n\033[0;34m%s\033[0m\n' "Running tests in $@" + @$@ $(URCHIN) -f test/fast + +test: fast + @$(URCHIN) -f test/slow + +default: test \ No newline at end of file diff --git "a/test/fast/Running \"nvm current\" should display current nvm environment." "b/test/fast/Running \"nvm current\" should display current nvm environment." index 9a76b9d..d9293ed 100755 --- "a/test/fast/Running \"nvm current\" should display current nvm environment." +++ "b/test/fast/Running \"nvm current\" should display current nvm environment." @@ -3,4 +3,4 @@ die () { echo $@ ; exit 1; } . ../../nvm.sh -[ "$(nvm current)" = `node -v` ] || die "Failed to find current version" +[ "$(nvm current)" = "$(node -v)" ] || die "Failed to find current version" From def7ec536415079b63e96d323b9720afa332af5d Mon Sep 17 00:00:00 2001 From: Koen Punt Date: Sat, 22 Mar 2014 18:51:14 +0100 Subject: [PATCH 2/2] install shells before running tests --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d967767..3678102 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,7 @@ language: bash +install: + - sudo apt-get install ksh zsh -y before_script: - curl -o /tmp/urchin https://raw.github.com/scraperwiki/urchin/master/urchin && chmod +x /tmp/urchin script: - - NVM_DIR=$TRAVIS_BUILD_DIR make URCHIN=/tmp/urchin test \ No newline at end of file + - NVM_DIR=$TRAVIS_BUILD_DIR make URCHIN=/tmp/urchin test