Commit e8a2b3a63c14841b7dc04d43014edd9faa687885

Authored by Shrikant Sharat
1 parent eb1ebaf3c0

Added tests for loading prezto's `init.zsh`.

Showing 2 changed files with 18 additions and 2 deletions Side-by-side Diff

... ... @@ -33,7 +33,8 @@ mkdir "$PLUGIN_DIR2"
33 33 # A wrapper function over `git` to work with the test plugin repo.
34 34 alias pg2='git --git-dir "$PLUGIN_DIR2/.git" --work-tree "$PLUGIN_DIR2"'
35 35  
36   -echo 'alias hehe2="echo hehe2"' > "$PLUGIN_DIR2"/aliases.zsh
  36 +echo 'alias hehe2="echo hehe2"' > "$PLUGIN_DIR2"/init.zsh
  37 +echo 'alias unsourced-alias="echo unsourced-alias"' > "$PLUGIN_DIR2"/aliases.zsh
37 38  
38 39 {
39 40 pg2 init
1 1 Load plugin from master.
2 2  
3 3 $ antigen-bundle $PLUGIN_DIR
4   - Cloning into '.+?'\.\.\. (re)
  4 + Cloning into '*'... (glob)
5 5 done.
6 6 $ hehe
7 7 hehe
... ... @@ -16,3 +16,18 @@ Confirm there is still only one repository.
16 16  
17 17 $ ls $ADOTDIR/repos | wc -l
18 18 1
  19 +
  20 +Load a prezto style module. Should only source the `init.zsh` present in the
  21 +module.
  22 +
  23 + $ antigen-bundle $PLUGIN_DIR2
  24 + Cloning into '*'... (glob)
  25 + done.
  26 + $ hehe2
  27 + hehe2
  28 +
  29 +The alias defined in the other zsh file should not be available.
  30 +
  31 + $ unsourced-alias
  32 + zsh: command not found: unsourced-alias
  33 + [127]