summaryrefslogtreecommitdiffstats
path: root/test.sh
diff options
context:
space:
mode:
authorMichael Allen <michael@michaelallen.io>2015-02-12 00:07:07 +0000
committerMichael Allen <michael@michaelallen.io>2015-02-12 00:07:07 +0000
commit8d7c08e7f0d1fd880345cf4c62b0568e509ce13a (patch)
tree87d3f4f3e51469c92eaf228d1a6a3551ac13e39d /test.sh
parent0eeb5677650dc35ce3e3bef77b6a9a3154d221d2 (diff)
downloadgit-sonar-8d7c08e7f0d1fd880345cf4c62b0568e509ce13a.tar.gz
git-sonar-8d7c08e7f0d1fd880345cf4c62b0568e509ce13a.zip
separate tests into modules
Diffstat (limited to 'test.sh')
-rwxr-xr-xtest.sh88
1 files changed, 2 insertions, 86 deletions
diff --git a/test.sh b/test.sh
index cc65c64..06bbc29 100755
--- a/test.sh
+++ b/test.sh
@@ -1,87 +1,3 @@
-set -e
+#!/bin/sh
-scriptDir="$( dirname "$0" )"
-
-source "$scriptDir/git-base.sh"
-
-echo "\n---------------------------"
-echo "\n In a git repo"
-echo "\n---------------------------"
-
-echo "\nTest: Root of this git repo"
-echo "$(git_root)"
-
-echo "\nTest: Location of .git"
-echo "$(dot_git)"
-
-echo "\nTest: is_repo should be false"
-if is_repo; then
- echo "is repo"
-else
- echo "not repo"
-fi
-
-echo "\nTest: Record the timestamp"
-record_timestamp
-echo "Timestamp = $(timestamp)"
-echo "Time now = $(time_now)"
-
-echo "\nTest: Time to update when just recorded"
-if time_to_update; then
- echo "time to update"
-else
- echo "not time yet"
-fi
-
-echo "\nTest: Don't fetch if it's not time to update"
-fetch_async "debug"
-
-echo "\nTest: Time to update when timestamp 5 mins ago"
-touch -A "-010000" "$(dot_git)/lastupdatetime"
-if time_to_update; then
- echo "time to update"
-else
- echo "not time yet"
-fi
-
-echo "\nTest: Do a non-blocking git fetch"
-fetch_async "debug"
-echo "Did I block?"
-
-
-echo "\n---------------------------"
-echo "\n Not in a git repo"
-echo "\n---------------------------"
-
-mkdir -p /tmp/git-base-tests
-cd /tmp/git-base-tests
-
-echo "\nTest: Root of this git repo"
-echo "git_root is:$(git_root) (empty means no root)"
-
-echo "\nTest: Location of .git"
-echo "dot_git is:$(dot_git) (empty means no root)"
-
-echo "\nTest: is_repo should be false"
-if is_repo; then
- echo "is repo"
-else
- echo "not repo"
-fi
-
-echo "\nTest: Record the timestamp"
-record_timestamp
-echo "no output should be seen"
-
-echo "\nTest: Check the timestamp"
-echo "timestamp is:$(timestamp) (empty means not in dir)"
-
-echo "\nTest: Is it time to update?"
-if time_to_update; then
- echo "time to update"
-else
- echo "not time yet"
-fi
-
-echo "\nTest: Try to fetch"
-fetch_async "debug"
+./test-directories.sh