Commit 293eecb9065b329af83080a0990ab9371b3e4620

Authored by Shrikant Sharat
1 parent e97637cd0f

Remove hard coded test plugin directory name.

Showing 3 changed files with 10 additions and 9 deletions Side-by-side Diff

... ... @@ -17,14 +17,15 @@ source "$TESTDIR/../antigen.zsh"
17 17  
18 18 # A test plugin repository to test out antigen with.
19 19  
20   -mkdir test-plugin
  20 +export PLUGIN_DIR="$PWD/test-plugin"
  21 +mkdir "$PLUGIN_DIR"
21 22  
22 23 # A wrapper function over `git` to work with the test plugin repo.
23 24 pg () {
24   - git --git-dir test-plugin/.git --work-tree test-plugin "$@"
  25 + git --git-dir "$PLUGIN_DIR"/.git --work-tree "$PLUGIN_DIR" "$@"
25 26 }
26 27  
27   -cat > test-plugin/aliases.zsh <<EOF
  28 +cat > "$PLUGIN_DIR"/aliases.zsh <<EOF
28 29 alias hehe='echo hehe'
29 30 EOF
30 31  
tests/branch-bundle.t
... ... @@ -3,7 +3,7 @@ Branch b1.
3 3 $ pg branch b1
4 4 $ pg checkout b1
5 5 Switched to branch 'b1'
6   - $ cat > test-plugin/aliases.zsh <<EOF
  6 + $ cat > $PLUGIN_DIR/aliases.zsh <<EOF
7 7 > alias hehe='echo hehe from b1'
8 8 > EOF
9 9 $ pg commit -am 'Change for b1'
... ... @@ -17,7 +17,7 @@ Go back to master.
17 17  
18 18 Load plugin from b1.
19 19  
20   - $ antigen-bundle $PWD/test-plugin --branch=b1
  20 + $ antigen-bundle $PLUGIN_DIR --branch=b1
21 21 Cloning into '.+?'\.\.\. (re)
22 22 done.
23 23 Switched to a new branch 'b1'
... ... @@ -27,7 +27,7 @@ Load plugin from b1.
27 27  
28 28 Load plugin from master.
29 29  
30   - $ antigen-bundle $PWD/test-plugin
  30 + $ antigen-bundle $PLUGIN_DIR
31 31 Cloning into '.+?'\.\.\. (re)
32 32 done.
33 33 $ hehe
1 1 Load plugin from master.
2 2  
3   - $ antigen-bundle $PWD/test-plugin
  3 + $ antigen-bundle $PLUGIN_DIR
4 4 Cloning into '.+?'\.\.\. (re)
5 5 done.
6 6 $ hehe
... ... @@ -8,7 +8,7 @@ Load plugin from master.
8 8  
9 9 Update the plugin.
10 10  
11   - $ cat > test-plugin/aliases.zsh <<EOF
  11 + $ cat > $PLUGIN_DIR/aliases.zsh <<EOF
12 12 > alias hehe='echo hehe, updated'
13 13 > EOF
14 14 $ pg commit -am 'Updated message'
... ... @@ -18,7 +18,7 @@ Update the plugin.
18 18 Update bundles.
19 19  
20 20 $ antigen-update
21   - From .+?/test-plugin (re)
  21 + From \S+? (re)
22 22 [a-z0-9]{7}\.\.[a-z0-9]{7} master -> origin/master (re)
23 23 Updating [a-z0-9]{7}\.\.[a-z0-9]{7} (re)
24 24 Fast-forward