From 01590aa28a44de6c1f9d5d41dd44a393d72291b9 Mon Sep 17 00:00:00 2001 From: Shrikant Sharat Date: Wed, 18 Jul 2012 17:02:52 +0530 Subject: [PATCH] Add test for cleanup command. --- tests/cleanup.t | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 tests/cleanup.t diff --git a/tests/cleanup.t b/tests/cleanup.t new file mode 100644 index 0000000..a5ceed2 --- /dev/null +++ b/tests/cleanup.t @@ -0,0 +1,45 @@ +Load a plugin. + + $ antigen-bundle $PLUGIN_DIR + Cloning into '*'... (glob) + done. + +Check the listing. + + $ antigen-list + */test-plugin / plugin (glob) + +Clear out the bundles record. + + $ _ANTIGEN_BUNDLE_RECORD="" + +Check the listing, after clearing the record. + + $ antigen-list + You don't have any bundles. + [1] + +Confirm the plugin directory exists. + + $ ls dot-antigen/repos | wc -l + 1 + +Do the cleanup. + + $ antigen-cleanup --force + You have clones for the following repos, but are not used. + */test-plugin (glob) + + + Deleting clone for */test-plugin... done. (glob) + +Check the listing, after cleanup. + + $ antigen-list + You don't have any bundles. + [1] + +Confirm the plugin directory does not exist after cleanup. + + $ ls dot-antigen/repos | wc -l + 0 -- 2.0.0