From e8a2b3a63c14841b7dc04d43014edd9faa687885 Mon Sep 17 00:00:00 2001 From: Shrikant Sharat Date: Sat, 19 Jan 2013 12:26:14 +0530 Subject: [PATCH] Added tests for loading prezto's `init.zsh`. --- tests/.zshenv | 3 ++- tests/bundle.t | 17 ++++++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/tests/.zshenv b/tests/.zshenv index d942446..c3af528 100644 --- a/tests/.zshenv +++ b/tests/.zshenv @@ -33,7 +33,8 @@ mkdir "$PLUGIN_DIR2" # A wrapper function over `git` to work with the test plugin repo. alias pg2='git --git-dir "$PLUGIN_DIR2/.git" --work-tree "$PLUGIN_DIR2"' -echo 'alias hehe2="echo hehe2"' > "$PLUGIN_DIR2"/aliases.zsh +echo 'alias hehe2="echo hehe2"' > "$PLUGIN_DIR2"/init.zsh +echo 'alias unsourced-alias="echo unsourced-alias"' > "$PLUGIN_DIR2"/aliases.zsh { pg2 init diff --git a/tests/bundle.t b/tests/bundle.t index 7a99a18..781eabe 100644 --- a/tests/bundle.t +++ b/tests/bundle.t @@ -1,7 +1,7 @@ Load plugin from master. $ antigen-bundle $PLUGIN_DIR - Cloning into '.+?'\.\.\. (re) + Cloning into '*'... (glob) done. $ hehe hehe @@ -16,3 +16,18 @@ Confirm there is still only one repository. $ ls $ADOTDIR/repos | wc -l 1 + +Load a prezto style module. Should only source the `init.zsh` present in the +module. + + $ antigen-bundle $PLUGIN_DIR2 + Cloning into '*'... (glob) + done. + $ hehe2 + hehe2 + +The alias defined in the other zsh file should not be available. + + $ unsourced-alias + zsh: command not found: unsourced-alias + [127] -- 2.0.0