diff --git a/tests/bundle.t b/tests/bundle.t index 0906783..7a99a18 100644 --- a/tests/bundle.t +++ b/tests/bundle.t @@ -12,33 +12,7 @@ Load the plugin again. Just to see nothing happens. $ hehe hehe -Update the plugin. - - $ cat > $PLUGIN_DIR/aliases.zsh < alias hehe='echo hehe, updated' - > EOF - $ pg commit -am 'Updated message' - \[master [a-f0-9]{7}\] Updated message (re) - 1 file changed, 1 insertion(+), 1 deletion(-) - -Update bundles. - - $ antigen-update - **** Pulling */test-plugin (glob) - From */test-plugin (glob) - ???????..??????? master -> origin/master (glob) - Updating ???????..??????? (glob) - Fast-forward - aliases.zsh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - - Confirm there is still only one repository. $ ls $ADOTDIR/repos | wc -l 1 - -The new alias should not activate. - - $ hehe - hehe diff --git a/tests/update.t b/tests/update.t new file mode 100644 index 0000000..6e5da88 --- /dev/null +++ b/tests/update.t @@ -0,0 +1,49 @@ +Load plugin. + + $ antigen-bundle $PLUGIN_DIR + Cloning into '.+?'\.\.\. (re) + done. + $ hehe + hehe + +Update the plugin. + + $ cat > $PLUGIN_DIR/aliases.zsh < alias hehe='echo hehe, updated' + > EOF + $ pg commit -am 'Updated message' + \[master [a-f0-9]{7}\] Updated message (re) + 1 file changed, 1 insertion(+), 1 deletion(-) + +Run antigen's update. + + $ antigen-update + **** Pulling */test-plugin (glob) + From */test-plugin (glob) + ???????..??????? master -> origin/master (glob) + Updating ???????..??????? (glob) + Fast-forward + aliases.zsh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + Updated from ??????? to ???????. (glob) + ??????? Updated message (glob) + aliases.zsh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + + +Confirm there is still only one repository. + + $ ls $ADOTDIR/repos | wc -l + 1 + +The new alias should not activate. + + $ hehe + hehe + +Run update again, with no changes in the origin repo. + + $ antigen-update + **** Pulling */test-plugin (glob) + Already up-to-date. +