From 8a241a16785a53023dfaa215cc6d810df3bf3de1 Mon Sep 17 00:00:00 2001 From: Shrikant Sharat Date: Fri, 13 Jul 2012 21:17:07 +0530 Subject: [PATCH] Refactoring and a small new test. --- tests/bundle.t | 42 ++++++++++++++++++++++++++++++++++++++++++ tests/update.t | 36 ------------------------------------ 2 files changed, 42 insertions(+), 36 deletions(-) create mode 100644 tests/bundle.t delete mode 100644 tests/update.t diff --git a/tests/bundle.t b/tests/bundle.t new file mode 100644 index 0000000..506c592 --- /dev/null +++ b/tests/bundle.t @@ -0,0 +1,42 @@ +Load plugin from master. + + $ antigen-bundle $PLUGIN_DIR + Cloning into '.+?'\.\.\. (re) + done. + $ hehe + hehe + +Load the plugin again. Just to see nothing happens. + + $ antigen-bundle $PLUGIN_DIR + $ 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 + 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 + 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 deleted file mode 100644 index 3d6e0d0..0000000 --- a/tests/update.t +++ /dev/null @@ -1,36 +0,0 @@ -Load plugin from master. - - $ 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(-) - -Update bundles. - - $ antigen-update - 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 - 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 -- 2.0.0