Commit 0952e605da4b5aebfdc7fe9b792af5730b45a0be

Authored by Shrikant Sharat
1 parent 0912ba4724

Separate and more tests for -update command.

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

... ... @@ -12,33 +12,7 @@ Load the plugin again. Just to see nothing happens.
12 12 $ hehe
13 13 hehe
14 14  
15   -Update the plugin.
16   -
17   - $ cat > $PLUGIN_DIR/aliases.zsh <<EOF
18   - > alias hehe='echo hehe, updated'
19   - > EOF
20   - $ pg commit -am 'Updated message'
21   - \[master [a-f0-9]{7}\] Updated message (re)
22   - 1 file changed, 1 insertion(+), 1 deletion(-)
23   -
24   -Update bundles.
25   -
26   - $ antigen-update
27   - **** Pulling */test-plugin (glob)
28   - From */test-plugin (glob)
29   - ???????..??????? master -> origin/master (glob)
30   - Updating ???????..??????? (glob)
31   - Fast-forward
32   - aliases.zsh | 2 +-
33   - 1 file changed, 1 insertion(+), 1 deletion(-)
34   -
35   -
36 15 Confirm there is still only one repository.
37 16  
38 17 $ ls $ADOTDIR/repos | wc -l
39 18 1
40   -
41   -The new alias should not activate.
42   -
43   - $ hehe
44   - hehe
... ... @@ -0,0 +1,49 @@
  1 +Load plugin.
  2 +
  3 + $ antigen-bundle $PLUGIN_DIR
  4 + Cloning into '.+?'\.\.\. (re)
  5 + done.
  6 + $ hehe
  7 + hehe
  8 +
  9 +Update the plugin.
  10 +
  11 + $ cat > $PLUGIN_DIR/aliases.zsh <<EOF
  12 + > alias hehe='echo hehe, updated'
  13 + > EOF
  14 + $ pg commit -am 'Updated message'
  15 + \[master [a-f0-9]{7}\] Updated message (re)
  16 + 1 file changed, 1 insertion(+), 1 deletion(-)
  17 +
  18 +Run antigen's update.
  19 +
  20 + $ antigen-update
  21 + **** Pulling */test-plugin (glob)
  22 + From */test-plugin (glob)
  23 + ???????..??????? master -> origin/master (glob)
  24 + Updating ???????..??????? (glob)
  25 + Fast-forward
  26 + aliases.zsh | 2 +-
  27 + 1 file changed, 1 insertion(+), 1 deletion(-)
  28 + Updated from ??????? to ???????. (glob)
  29 + ??????? Updated message (glob)
  30 + aliases.zsh | 2 +-
  31 + 1 file changed, 1 insertion(+), 1 deletion(-)
  32 +
  33 +
  34 +Confirm there is still only one repository.
  35 +
  36 + $ ls $ADOTDIR/repos | wc -l
  37 + 1
  38 +
  39 +The new alias should not activate.
  40 +
  41 + $ hehe
  42 + hehe
  43 +
  44 +Run update again, with no changes in the origin repo.
  45 +
  46 + $ antigen-update
  47 + **** Pulling */test-plugin (glob)
  48 + Already up-to-date.
  49 +