From 293eecb9065b329af83080a0990ab9371b3e4620 Mon Sep 17 00:00:00 2001 From: Shrikant Sharat Date: Fri, 13 Jul 2012 17:16:12 +0530 Subject: [PATCH] Remove hard coded test plugin directory name. --- tests/.zshenv | 7 ++++--- tests/branch-bundle.t | 6 +++--- tests/update.t | 6 +++--- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/tests/.zshenv b/tests/.zshenv index f4a97af..d27682e 100644 --- a/tests/.zshenv +++ b/tests/.zshenv @@ -17,14 +17,15 @@ source "$TESTDIR/../antigen.zsh" # A test plugin repository to test out antigen with. -mkdir test-plugin +export PLUGIN_DIR="$PWD/test-plugin" +mkdir "$PLUGIN_DIR" # A wrapper function over `git` to work with the test plugin repo. pg () { - git --git-dir test-plugin/.git --work-tree test-plugin "$@" + git --git-dir "$PLUGIN_DIR"/.git --work-tree "$PLUGIN_DIR" "$@" } -cat > test-plugin/aliases.zsh < "$PLUGIN_DIR"/aliases.zsh < test-plugin/aliases.zsh < $PLUGIN_DIR/aliases.zsh < alias hehe='echo hehe from b1' > EOF $ pg commit -am 'Change for b1' @@ -17,7 +17,7 @@ Go back to master. Load plugin from b1. - $ antigen-bundle $PWD/test-plugin --branch=b1 + $ antigen-bundle $PLUGIN_DIR --branch=b1 Cloning into '.+?'\.\.\. (re) done. Switched to a new branch 'b1' @@ -27,7 +27,7 @@ Load plugin from b1. Load plugin from master. - $ antigen-bundle $PWD/test-plugin + $ antigen-bundle $PLUGIN_DIR Cloning into '.+?'\.\.\. (re) done. $ hehe diff --git a/tests/update.t b/tests/update.t index 9dac997..3d6e0d0 100644 --- a/tests/update.t +++ b/tests/update.t @@ -1,6 +1,6 @@ Load plugin from master. - $ antigen-bundle $PWD/test-plugin + $ antigen-bundle $PLUGIN_DIR Cloning into '.+?'\.\.\. (re) done. $ hehe @@ -8,7 +8,7 @@ Load plugin from master. Update the plugin. - $ cat > test-plugin/aliases.zsh < $PLUGIN_DIR/aliases.zsh < alias hehe='echo hehe, updated' > EOF $ pg commit -am 'Updated message' @@ -18,7 +18,7 @@ Update the plugin. Update bundles. $ antigen-update - From .+?/test-plugin (re) + From \S+? (re) [a-z0-9]{7}\.\.[a-z0-9]{7} master -> origin/master (re) Updating [a-z0-9]{7}\.\.[a-z0-9]{7} (re) Fast-forward -- 2.0.0