Commit 532a56441b5231ac0965d4a4f208c75e98b80200
1 parent
3201f76b9b
Fix mild output format changes in git.
Travis is now using git version 1.8.* to run the tests and there is a slight difference in output formatting of the git commands. This is causing mis-leading test failures.
Showing 2 changed files with 4 additions and 4 deletions Inline Diff
tests/revert-update.t
| 1 | Load and test plugin. | 1 | Load and test plugin. |
| 2 | 2 | ||
| 3 | $ antigen-bundle $PLUGIN_DIR | 3 | $ antigen-bundle $PLUGIN_DIR |
| 4 | Cloning into '.+?'\.\.\. (re) | 4 | Cloning into '.+?'\.\.\. (re) |
| 5 | done. | 5 | done. |
| 6 | $ hehe | 6 | $ hehe |
| 7 | hehe | 7 | hehe |
| 8 | 8 | ||
| 9 | Save the current HEAD of the plugin. | 9 | Save the current HEAD of the plugin. |
| 10 | 10 | ||
| 11 | $ old_version="$(pg rev-parse HEAD)" | 11 | $ old_version="$(pg rev-parse HEAD)" |
| 12 | 12 | ||
| 13 | Modify the plugin. | 13 | Modify the plugin. |
| 14 | 14 | ||
| 15 | $ cat > $PLUGIN_DIR/aliases.zsh <<EOF | 15 | $ cat > $PLUGIN_DIR/aliases.zsh <<EOF |
| 16 | > alias hehe='echo hehe, updated' | 16 | > alias hehe='echo hehe, updated' |
| 17 | > EOF | 17 | > EOF |
| 18 | $ pg commit -am 'Updated message' | 18 | $ pg commit -am 'Updated message' |
| 19 | \[master [a-f0-9]{7}\] Updated message (re) | 19 | \[master [a-f0-9]{7}\] Updated message (re) |
| 20 | 1 file changed, 1 insertion(+), 1 deletion(-) | 20 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 21 | 21 | ||
| 22 | Save the new HEAD of the plugin. | 22 | Save the new HEAD of the plugin. |
| 23 | 23 | ||
| 24 | $ new_version="$(pg rev-parse HEAD)" | 24 | $ new_version="$(pg rev-parse HEAD)" |
| 25 | 25 | ||
| 26 | Define a convenience function to get the current version. | 26 | Define a convenience function to get the current version. |
| 27 | 27 | ||
| 28 | $ current-version () {(cd dot-antigen/repos/* && git rev-parse HEAD)} | 28 | $ current-version () {(cd dot-antigen/repos/* && git rev-parse HEAD)} |
| 29 | 29 | ||
| 30 | Confirm we currently have the old version. | 30 | Confirm we currently have the old version. |
| 31 | 31 | ||
| 32 | $ [[ $(current-version) == $old_version ]] | 32 | $ [[ $(current-version) == $old_version ]] |
| 33 | 33 | ||
| 34 | Run antigen's update. | 34 | Run antigen's update. |
| 35 | 35 | ||
| 36 | $ antigen-update | 36 | $ antigen-update |
| 37 | **** Pulling */test-plugin (glob) | 37 | **** Pulling */test-plugin (glob) |
| 38 | From */test-plugin (glob) | 38 | From */test-plugin (glob) |
| 39 | ???????..??????? master -> origin/master (glob) | 39 | ???????..??????? master -> origin/master (glob) |
| 40 | Updating ???????..??????? (glob) | 40 | Updating ???????..??????? (glob) |
| 41 | Fast-forward | 41 | Fast-forward |
| 42 | aliases.zsh | 2 +- | 42 | aliases.zsh |\s+2 \+- (re) |
| 43 | 1 file changed, 1 insertion(+), 1 deletion(-) | 43 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 44 | Updated from ??????? to ???????. (glob) | 44 | Updated from ??????? to ???????. (glob) |
| 45 | ??????? Updated message (glob) | 45 | ??????? Updated message (glob) |
| 46 | aliases.zsh | 2 +- | 46 | aliases.zsh |\s+2 +- (re) |
| 47 | 1 file changed, 1 insertion(+), 1 deletion(-) | 47 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 48 | 48 | ||
| 49 | 49 | ||
| 50 | Confirm we have the new version. | 50 | Confirm we have the new version. |
| 51 | 51 | ||
| 52 | $ [[ $(current-version) == $new_version ]] | 52 | $ [[ $(current-version) == $new_version ]] |
| 53 | 53 | ||
| 54 | Run update again, with no changes in the origin repo. | 54 | Run update again, with no changes in the origin repo. |
| 55 | 55 | ||
| 56 | $ antigen-revert | 56 | $ antigen-revert |
| 57 | Reverted to state before running -update on *. (glob) | 57 | Reverted to state before running -update on *. (glob) |
| 58 | 58 | ||
| 59 | Confirm we have the old version again. | 59 | Confirm we have the old version again. |
| 60 | 60 | ||
| 61 | $ [[ $(current-version) == $old_version ]] | 61 | $ [[ $(current-version) == $old_version ]] |
| 62 | 62 |
tests/update.t
| 1 | Load plugin. | 1 | Load plugin. |
| 2 | 2 | ||
| 3 | $ antigen-bundle $PLUGIN_DIR | 3 | $ antigen-bundle $PLUGIN_DIR |
| 4 | Cloning into '.+?'\.\.\. (re) | 4 | Cloning into '.+?'\.\.\. (re) |
| 5 | done. | 5 | done. |
| 6 | $ hehe | 6 | $ hehe |
| 7 | hehe | 7 | hehe |
| 8 | 8 | ||
| 9 | Update the plugin. | 9 | Update the plugin. |
| 10 | 10 | ||
| 11 | $ cat > $PLUGIN_DIR/aliases.zsh <<EOF | 11 | $ cat > $PLUGIN_DIR/aliases.zsh <<EOF |
| 12 | > alias hehe='echo hehe, updated' | 12 | > alias hehe='echo hehe, updated' |
| 13 | > EOF | 13 | > EOF |
| 14 | $ pg commit -am 'Updated message' | 14 | $ pg commit -am 'Updated message' |
| 15 | \[master [a-f0-9]{7}\] Updated message (re) | 15 | \[master [a-f0-9]{7}\] Updated message (re) |
| 16 | 1 file changed, 1 insertion(+), 1 deletion(-) | 16 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 17 | 17 | ||
| 18 | Run antigen's update. | 18 | Run antigen's update. |
| 19 | 19 | ||
| 20 | $ antigen-update | 20 | $ antigen-update |
| 21 | **** Pulling */test-plugin (glob) | 21 | **** Pulling */test-plugin (glob) |
| 22 | From */test-plugin (glob) | 22 | From */test-plugin (glob) |
| 23 | ???????..??????? master -> origin/master (glob) | 23 | ???????..??????? master -> origin/master (glob) |
| 24 | Updating ???????..??????? (glob) | 24 | Updating ???????..??????? (glob) |
| 25 | Fast-forward | 25 | Fast-forward |
| 26 | aliases.zsh | 2 +- | 26 | aliases.zsh |\s+2 \+- (re) |
| 27 | 1 file changed, 1 insertion(+), 1 deletion(-) | 27 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 28 | Updated from ??????? to ???????. (glob) | 28 | Updated from ??????? to ???????. (glob) |
| 29 | ??????? Updated message (glob) | 29 | ??????? Updated message (glob) |
| 30 | aliases.zsh | 2 +- | 30 | aliases.zsh |\s+2 \+- (re) |
| 31 | 1 file changed, 1 insertion(+), 1 deletion(-) | 31 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 32 | 32 | ||
| 33 | 33 | ||
| 34 | Confirm there is still only one repository. | 34 | Confirm there is still only one repository. |
| 35 | 35 | ||
| 36 | $ ls $ADOTDIR/repos | wc -l | 36 | $ ls $ADOTDIR/repos | wc -l |
| 37 | 1 | 37 | 1 |
| 38 | 38 | ||
| 39 | The new alias should not activate. | 39 | The new alias should not activate. |
| 40 | 40 | ||
| 41 | $ hehe | 41 | $ hehe |
| 42 | hehe | 42 | hehe |
| 43 | 43 | ||
| 44 | Run update again, with no changes in the origin repo. | 44 | Run update again, with no changes in the origin repo. |
| 45 | 45 | ||
| 46 | $ antigen-update | 46 | $ antigen-update |
| 47 | **** Pulling */test-plugin (glob) | 47 | **** Pulling */test-plugin (glob) |
| 48 | Already up-to-date. | 48 | Already up-to-date. |
| 49 | 49 | ||
| 50 | 50 |