diff options
author | Michael Allen <michael@michaelallen.io> | 2015-07-23 19:35:09 +0100 |
---|---|---|
committer | Michael Allen <michael@michaelallen.io> | 2015-07-23 19:35:09 +0100 |
commit | 5c31b9242140877bef777dd37f0810457bd9b64a (patch) | |
tree | b1f29561e5b0dd7ea8a302fc21c1426c9de61543 /test-status.sh | |
parent | 292a040b4abbbf085b97f7b285e67c97960dc510 (diff) | |
download | git-sonar-5c31b9242140877bef777dd37f0810457bd9b64a.tar.gz git-sonar-5c31b9242140877bef777dd37f0810457bd9b64a.zip |
provide the ability to surround letter in a status with a color
Diffstat (limited to '')
-rwxr-xr-x | test-status.sh | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test-status.sh b/test-status.sh index 8b9cf2f..a831151 100755 --- a/test-status.sh +++ b/test-status.sh @@ -2,6 +2,37 @@ scriptDir="$(cd "$(dirname "$0")"; pwd)" source "$scriptDir/git-base.sh" +test_prefix_and_suffix() { + status=""" + M unstaged-modified + D unstaged-deleted +M staged-modified +A staged-added +D staged-deleted +C staged-copied +R staged-renamed +UD deleted-them-conflicted +AU added-us-conflicted +UU modified-both-conflicted +?? untacked +""" + + prefix="_" + suffix="-" + + assertEquals "line:${LINENO}" "1_D-1_M-"\ + "$(unstaged_status "$status" "$prefix" "$suffix")" + + assertEquals "line:${LINENO}" "1_A-1_D-1_M-1_R-1_C-"\ + "$(staged_status "$status" "$prefix" "$suffix")" + + assertEquals "line:${LINENO}" "1_U-1_T-1_B-"\ + "$(conflicted_status "$status" "$prefix" "$suffix")" + + assertEquals "line:${LINENO}" "1_A-"\ + "$(untracked_status "$status" "$prefix" "$suffix")" +} + test_basic_unstaged_options() { status=""" M modified-and-unstaged |