|
|
@@ -32,6 +32,7 @@ setup() {
|
|
|
|
export INPUT_COMMIT_AUTHOR="Test Suite <test@users.noreply.github.com>"
|
|
|
|
export INPUT_COMMIT_AUTHOR="Test Suite <test@users.noreply.github.com>"
|
|
|
|
export INPUT_TAGGING_MESSAGE=""
|
|
|
|
export INPUT_TAGGING_MESSAGE=""
|
|
|
|
export INPUT_PUSH_OPTIONS=""
|
|
|
|
export INPUT_PUSH_OPTIONS=""
|
|
|
|
|
|
|
|
export INPUT_CHECKOUT_OPTIONS=""
|
|
|
|
export INPUT_SKIP_DIRTY_CHECK=false
|
|
|
|
export INPUT_SKIP_DIRTY_CHECK=false
|
|
|
|
|
|
|
|
|
|
|
|
skipIfNot "$BATS_TEST_DESCRIPTION"
|
|
|
|
skipIfNot "$BATS_TEST_DESCRIPTION"
|
|
|
@@ -71,7 +72,7 @@ main() {
|
|
|
|
|
|
|
|
|
|
|
|
shellmock_expect git --type partial --output " M new-file-1.txt M new-file-2.txt M new-file-3.txt" --match "status"
|
|
|
|
shellmock_expect git --type partial --output " M new-file-1.txt M new-file-2.txt M new-file-3.txt" --match "status"
|
|
|
|
shellmock_expect git --type exact --match "fetch"
|
|
|
|
shellmock_expect git --type exact --match "fetch"
|
|
|
|
shellmock_expect git --type exact --match "checkout master"
|
|
|
|
shellmock_expect git --type exact --match "checkout master --"
|
|
|
|
shellmock_expect git --type partial --match "add ."
|
|
|
|
shellmock_expect git --type partial --match "add ."
|
|
|
|
shellmock_expect git --type partial --match '-c'
|
|
|
|
shellmock_expect git --type partial --match '-c'
|
|
|
|
shellmock_expect git --type partial --match 'push --set-upstream origin'
|
|
|
|
shellmock_expect git --type partial --match 'push --set-upstream origin'
|
|
|
@@ -99,7 +100,7 @@ main() {
|
|
|
|
shellmock_verify
|
|
|
|
shellmock_verify
|
|
|
|
[ "${capture[0]}" = "git-stub status -s -- ." ]
|
|
|
|
[ "${capture[0]}" = "git-stub status -s -- ." ]
|
|
|
|
[ "${capture[1]}" = "git-stub fetch" ]
|
|
|
|
[ "${capture[1]}" = "git-stub fetch" ]
|
|
|
|
[ "${capture[2]}" = "git-stub checkout master" ]
|
|
|
|
[ "${capture[2]}" = "git-stub checkout master --" ]
|
|
|
|
[ "${capture[3]}" = "git-stub add ." ]
|
|
|
|
[ "${capture[3]}" = "git-stub add ." ]
|
|
|
|
[ "${capture[4]}" = "git-stub -c user.name=Test Suite -c user.email=test@github.com commit -m Commit Message --author=Test Suite <test@users.noreply.github.com>" ]
|
|
|
|
[ "${capture[4]}" = "git-stub -c user.name=Test Suite -c user.email=test@github.com commit -m Commit Message --author=Test Suite <test@users.noreply.github.com>" ]
|
|
|
|
[ "${capture[5]}" = "git-stub push --set-upstream origin HEAD:master --tags" ]
|
|
|
|
[ "${capture[5]}" = "git-stub push --set-upstream origin HEAD:master --tags" ]
|
|
|
@@ -111,7 +112,7 @@ main() {
|
|
|
|
|
|
|
|
|
|
|
|
shellmock_expect git --type exact --match "status -s ."
|
|
|
|
shellmock_expect git --type exact --match "status -s ."
|
|
|
|
shellmock_expect git --type exact --match "fetch"
|
|
|
|
shellmock_expect git --type exact --match "fetch"
|
|
|
|
shellmock_expect git --type exact --match "checkout master"
|
|
|
|
shellmock_expect git --type exact --match "checkout master --"
|
|
|
|
shellmock_expect git --type exact --match "add ."
|
|
|
|
shellmock_expect git --type exact --match "add ."
|
|
|
|
shellmock_expect git --type partial --match '-c'
|
|
|
|
shellmock_expect git --type partial --match '-c'
|
|
|
|
shellmock_expect git --type partial --match 'push origin'
|
|
|
|
shellmock_expect git --type partial --match 'push origin'
|
|
|
@@ -123,7 +124,7 @@ main() {
|
|
|
|
shellmock_verify
|
|
|
|
shellmock_verify
|
|
|
|
[ "${capture[0]}" = "git-stub status -s -- ." ]
|
|
|
|
[ "${capture[0]}" = "git-stub status -s -- ." ]
|
|
|
|
[ "${capture[1]}" = "git-stub fetch" ]
|
|
|
|
[ "${capture[1]}" = "git-stub fetch" ]
|
|
|
|
[ "${capture[2]}" = "git-stub checkout master" ]
|
|
|
|
[ "${capture[2]}" = "git-stub checkout master --" ]
|
|
|
|
[ "${capture[3]}" = "git-stub add ." ]
|
|
|
|
[ "${capture[3]}" = "git-stub add ." ]
|
|
|
|
[ "${capture[4]}" = "git-stub -c user.name=Test Suite -c user.email=test@github.com commit -m Commit Message --author=Test Suite <test@users.noreply.github.com>" ]
|
|
|
|
[ "${capture[4]}" = "git-stub -c user.name=Test Suite -c user.email=test@github.com commit -m Commit Message --author=Test Suite <test@users.noreply.github.com>" ]
|
|
|
|
[ "${capture[5]}" = "git-stub push --set-upstream origin HEAD:master --tags" ]
|
|
|
|
[ "${capture[5]}" = "git-stub push --set-upstream origin HEAD:master --tags" ]
|
|
|
@@ -148,7 +149,7 @@ main() {
|
|
|
|
|
|
|
|
|
|
|
|
shellmock_expect git --type partial --output " M new-file-1.html M new-file-2.html" --match "status"
|
|
|
|
shellmock_expect git --type partial --output " M new-file-1.html M new-file-2.html" --match "status"
|
|
|
|
shellmock_expect git --type exact --match "fetch"
|
|
|
|
shellmock_expect git --type exact --match "fetch"
|
|
|
|
shellmock_expect git --type exact --match "checkout master"
|
|
|
|
shellmock_expect git --type exact --match "checkout master --"
|
|
|
|
shellmock_expect git --type partial --match "add"
|
|
|
|
shellmock_expect git --type partial --match "add"
|
|
|
|
shellmock_expect git --type partial --match '-c'
|
|
|
|
shellmock_expect git --type partial --match '-c'
|
|
|
|
shellmock_expect git --type partial --match 'push --set-upstream origin'
|
|
|
|
shellmock_expect git --type partial --match 'push --set-upstream origin'
|
|
|
@@ -167,7 +168,7 @@ main() {
|
|
|
|
shellmock_verify
|
|
|
|
shellmock_verify
|
|
|
|
[ "${capture[0]}" = "git-stub status -s -- a.txt b.txt c.txt new-file-1.html new-file-2.html" ]
|
|
|
|
[ "${capture[0]}" = "git-stub status -s -- a.txt b.txt c.txt new-file-1.html new-file-2.html" ]
|
|
|
|
[ "${capture[1]}" = "git-stub fetch" ]
|
|
|
|
[ "${capture[1]}" = "git-stub fetch" ]
|
|
|
|
[ "${capture[2]}" = "git-stub checkout master" ]
|
|
|
|
[ "${capture[2]}" = "git-stub checkout master --" ]
|
|
|
|
[ "${capture[3]}" = "git-stub add a.txt b.txt c.txt new-file-1.html new-file-2.html" ]
|
|
|
|
[ "${capture[3]}" = "git-stub add a.txt b.txt c.txt new-file-1.html new-file-2.html" ]
|
|
|
|
[ "${capture[4]}" = "git-stub -c user.name=Test Suite -c user.email=test@github.com commit -m Commit Message --author=Test Suite <test@users.noreply.github.com>" ]
|
|
|
|
[ "${capture[4]}" = "git-stub -c user.name=Test Suite -c user.email=test@github.com commit -m Commit Message --author=Test Suite <test@users.noreply.github.com>" ]
|
|
|
|
[ "${capture[5]}" = "git-stub push --set-upstream origin HEAD:master --tags" ]
|
|
|
|
[ "${capture[5]}" = "git-stub push --set-upstream origin HEAD:master --tags" ]
|
|
|
@@ -181,7 +182,7 @@ main() {
|
|
|
|
|
|
|
|
|
|
|
|
shellmock_expect git --type partial --output " M new-file-1.txt M new-file-2.txt" --match "status"
|
|
|
|
shellmock_expect git --type partial --output " M new-file-1.txt M new-file-2.txt" --match "status"
|
|
|
|
shellmock_expect git --type exact --match "fetch"
|
|
|
|
shellmock_expect git --type exact --match "fetch"
|
|
|
|
shellmock_expect git --type exact --match "checkout master"
|
|
|
|
shellmock_expect git --type exact --match "checkout master --"
|
|
|
|
shellmock_expect git --type partial --match "add"
|
|
|
|
shellmock_expect git --type partial --match "add"
|
|
|
|
shellmock_expect git --type partial --match '-c'
|
|
|
|
shellmock_expect git --type partial --match '-c'
|
|
|
|
shellmock_expect git --type partial --match 'push --set-upstream origin'
|
|
|
|
shellmock_expect git --type partial --match 'push --set-upstream origin'
|
|
|
@@ -198,7 +199,7 @@ main() {
|
|
|
|
shellmock_verify
|
|
|
|
shellmock_verify
|
|
|
|
[ "${capture[0]}" = "git-stub status -s -- ." ]
|
|
|
|
[ "${capture[0]}" = "git-stub status -s -- ." ]
|
|
|
|
[ "${capture[1]}" = "git-stub fetch" ]
|
|
|
|
[ "${capture[1]}" = "git-stub fetch" ]
|
|
|
|
[ "${capture[2]}" = "git-stub checkout master" ]
|
|
|
|
[ "${capture[2]}" = "git-stub checkout master --" ]
|
|
|
|
[ "${capture[3]}" = "git-stub add ." ]
|
|
|
|
[ "${capture[3]}" = "git-stub add ." ]
|
|
|
|
[ "${capture[4]}" = "git-stub -c user.name=Test Suite -c user.email=test@github.com commit -m Commit Message --author=Test Suite <test@users.noreply.github.com> --no-verify --signoff" ]
|
|
|
|
[ "${capture[4]}" = "git-stub -c user.name=Test Suite -c user.email=test@github.com commit -m Commit Message --author=Test Suite <test@users.noreply.github.com> --no-verify --signoff" ]
|
|
|
|
[ "${capture[5]}" = "git-stub push --set-upstream origin HEAD:master --tags" ]
|
|
|
|
[ "${capture[5]}" = "git-stub push --set-upstream origin HEAD:master --tags" ]
|
|
|
@@ -214,7 +215,7 @@ main() {
|
|
|
|
|
|
|
|
|
|
|
|
shellmock_expect git --type partial --output " M new-file-1.txt M new-file-2.txt" --match "status"
|
|
|
|
shellmock_expect git --type partial --output " M new-file-1.txt M new-file-2.txt" --match "status"
|
|
|
|
shellmock_expect git --type exact --match "fetch"
|
|
|
|
shellmock_expect git --type exact --match "fetch"
|
|
|
|
shellmock_expect git --type exact --match "checkout master"
|
|
|
|
shellmock_expect git --type exact --match "checkout master --"
|
|
|
|
shellmock_expect git --type partial --match "add"
|
|
|
|
shellmock_expect git --type partial --match "add"
|
|
|
|
shellmock_expect git --type partial --match '-c'
|
|
|
|
shellmock_expect git --type partial --match '-c'
|
|
|
|
shellmock_expect git --type partial --match 'push --set-upstream origin'
|
|
|
|
shellmock_expect git --type partial --match 'push --set-upstream origin'
|
|
|
@@ -231,7 +232,7 @@ main() {
|
|
|
|
shellmock_verify
|
|
|
|
shellmock_verify
|
|
|
|
[ "${capture[0]}" = "git-stub status -s -- ." ]
|
|
|
|
[ "${capture[0]}" = "git-stub status -s -- ." ]
|
|
|
|
[ "${capture[1]}" = "git-stub fetch" ]
|
|
|
|
[ "${capture[1]}" = "git-stub fetch" ]
|
|
|
|
[ "${capture[2]}" = "git-stub checkout master" ]
|
|
|
|
[ "${capture[2]}" = "git-stub checkout master --" ]
|
|
|
|
[ "${capture[3]}" = "git-stub add ." ]
|
|
|
|
[ "${capture[3]}" = "git-stub add ." ]
|
|
|
|
[ "${capture[4]}" = "git-stub -c user.name=A Single Test -c user.email=single-test@github.com commit -m Commit Message --author=A Single Test <single@users.noreply.github.com>" ]
|
|
|
|
[ "${capture[4]}" = "git-stub -c user.name=A Single Test -c user.email=single-test@github.com commit -m Commit Message --author=A Single Test <single@users.noreply.github.com>" ]
|
|
|
|
[ "${capture[5]}" = "git-stub push --set-upstream origin HEAD:master --tags" ]
|
|
|
|
[ "${capture[5]}" = "git-stub push --set-upstream origin HEAD:master --tags" ]
|
|
|
@@ -245,7 +246,7 @@ main() {
|
|
|
|
|
|
|
|
|
|
|
|
shellmock_expect git --type partial --output " M new-file-1.txt M new-file-2.txt M new-file-3.txt" --match "status"
|
|
|
|
shellmock_expect git --type partial --output " M new-file-1.txt M new-file-2.txt M new-file-3.txt" --match "status"
|
|
|
|
shellmock_expect git --type exact --match "fetch"
|
|
|
|
shellmock_expect git --type exact --match "fetch"
|
|
|
|
shellmock_expect git --type exact --match "checkout master"
|
|
|
|
shellmock_expect git --type exact --match "checkout master --"
|
|
|
|
shellmock_expect git --type partial --match "add ."
|
|
|
|
shellmock_expect git --type partial --match "add ."
|
|
|
|
shellmock_expect git --type partial --match '-c'
|
|
|
|
shellmock_expect git --type partial --match '-c'
|
|
|
|
shellmock_expect git --type partial --match 'push --set-upstream origin'
|
|
|
|
shellmock_expect git --type partial --match 'push --set-upstream origin'
|
|
|
@@ -265,7 +266,7 @@ main() {
|
|
|
|
shellmock_verify
|
|
|
|
shellmock_verify
|
|
|
|
[ "${capture[0]}" = "git-stub status -s -- ." ]
|
|
|
|
[ "${capture[0]}" = "git-stub status -s -- ." ]
|
|
|
|
[ "${capture[1]}" = "git-stub fetch" ]
|
|
|
|
[ "${capture[1]}" = "git-stub fetch" ]
|
|
|
|
[ "${capture[2]}" = "git-stub checkout master" ]
|
|
|
|
[ "${capture[2]}" = "git-stub checkout master --" ]
|
|
|
|
[ "${capture[3]}" = "git-stub add ." ]
|
|
|
|
[ "${capture[3]}" = "git-stub add ." ]
|
|
|
|
[ "${capture[4]}" = "git-stub -c user.name=Test Suite -c user.email=test@github.com commit -m Commit Message --author=Test Suite <test@users.noreply.github.com>" ]
|
|
|
|
[ "${capture[4]}" = "git-stub -c user.name=Test Suite -c user.email=test@github.com commit -m Commit Message --author=Test Suite <test@users.noreply.github.com>" ]
|
|
|
|
[ "${capture[5]}" = "git-stub -c user.name=Test Suite -c user.email=test@github.com tag -a v1.0.0 -m v1.0.0" ]
|
|
|
|
[ "${capture[5]}" = "git-stub -c user.name=Test Suite -c user.email=test@github.com tag -a v1.0.0 -m v1.0.0" ]
|
|
|
@@ -281,7 +282,7 @@ main() {
|
|
|
|
|
|
|
|
|
|
|
|
shellmock_expect git --type partial --output " M new-file-1.txt M new-file-2.txt M new-file-3.txt" --match "status"
|
|
|
|
shellmock_expect git --type partial --output " M new-file-1.txt M new-file-2.txt M new-file-3.txt" --match "status"
|
|
|
|
shellmock_expect git --type exact --match "fetch"
|
|
|
|
shellmock_expect git --type exact --match "fetch"
|
|
|
|
shellmock_expect git --type exact --match "checkout master"
|
|
|
|
shellmock_expect git --type exact --match "checkout master --"
|
|
|
|
shellmock_expect git --type partial --match "add ."
|
|
|
|
shellmock_expect git --type partial --match "add ."
|
|
|
|
shellmock_expect git --type partial --match '-c'
|
|
|
|
shellmock_expect git --type partial --match '-c'
|
|
|
|
shellmock_expect git --type partial --match 'push --set-upstream origin'
|
|
|
|
shellmock_expect git --type partial --match 'push --set-upstream origin'
|
|
|
@@ -301,13 +302,46 @@ main() {
|
|
|
|
shellmock_verify
|
|
|
|
shellmock_verify
|
|
|
|
[ "${capture[0]}" = "git-stub status -s -- ." ]
|
|
|
|
[ "${capture[0]}" = "git-stub status -s -- ." ]
|
|
|
|
[ "${capture[1]}" = "git-stub fetch" ]
|
|
|
|
[ "${capture[1]}" = "git-stub fetch" ]
|
|
|
|
[ "${capture[2]}" = "git-stub checkout master" ]
|
|
|
|
[ "${capture[2]}" = "git-stub checkout master --" ]
|
|
|
|
[ "${capture[3]}" = "git-stub add ." ]
|
|
|
|
[ "${capture[3]}" = "git-stub add ." ]
|
|
|
|
[ "${capture[4]}" = "git-stub -c user.name=Test Suite -c user.email=test@github.com commit -m Commit Message --author=Test Suite <test@users.noreply.github.com>" ]
|
|
|
|
[ "${capture[4]}" = "git-stub -c user.name=Test Suite -c user.email=test@github.com commit -m Commit Message --author=Test Suite <test@users.noreply.github.com>" ]
|
|
|
|
[ "${capture[5]}" = "git-stub push --set-upstream origin HEAD:master --tags --force" ]
|
|
|
|
[ "${capture[5]}" = "git-stub push --set-upstream origin HEAD:master --tags --force" ]
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@test "git-checkout-options-are-applied" {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
INPUT_CHECKOUT_OPTIONS="-b --progress"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
touch "${test_repository}"/new-file-{1,2,3}.txt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
shellmock_expect git --type partial --output " M new-file-1.txt M new-file-2.txt M new-file-3.txt" --match "status"
|
|
|
|
|
|
|
|
shellmock_expect git --type exact --match "fetch"
|
|
|
|
|
|
|
|
shellmock_expect git --type exact --match "checkout -b --progress master --"
|
|
|
|
|
|
|
|
shellmock_expect git --type partial --match "add ."
|
|
|
|
|
|
|
|
shellmock_expect git --type partial --match '-c'
|
|
|
|
|
|
|
|
shellmock_expect git --type partial --match 'push --set-upstream origin'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
run main
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo "$output"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Success Exit Code
|
|
|
|
|
|
|
|
[ "$status" = 0 ]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[ "${lines[10]}" = "::debug::Push commit to remote branch master" ]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
shellmock_verify
|
|
|
|
|
|
|
|
[ "${capture[0]}" = "git-stub status -s -- ." ]
|
|
|
|
|
|
|
|
[ "${capture[1]}" = "git-stub fetch" ]
|
|
|
|
|
|
|
|
[ "${capture[2]}" = "git-stub checkout -b --progress master --" ]
|
|
|
|
|
|
|
|
[ "${capture[3]}" = "git-stub add ." ]
|
|
|
|
|
|
|
|
[ "${capture[4]}" = "git-stub -c user.name=Test Suite -c user.email=test@github.com commit -m Commit Message --author=Test Suite <test@users.noreply.github.com>" ]
|
|
|
|
|
|
|
|
[ "${capture[5]}" = "git-stub push --set-upstream origin HEAD:master --tags" ]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@test "can-checkout-different-branch" {
|
|
|
|
@test "can-checkout-different-branch" {
|
|
|
|
|
|
|
|
|
|
|
|
INPUT_BRANCH="foo"
|
|
|
|
INPUT_BRANCH="foo"
|
|
|
@@ -316,7 +350,7 @@ main() {
|
|
|
|
|
|
|
|
|
|
|
|
shellmock_expect git --type partial --output " M new-file-1.txt M new-file-2.txt M new-file-3.txt" --match "status"
|
|
|
|
shellmock_expect git --type partial --output " M new-file-1.txt M new-file-2.txt M new-file-3.txt" --match "status"
|
|
|
|
shellmock_expect git --type exact --match "fetch"
|
|
|
|
shellmock_expect git --type exact --match "fetch"
|
|
|
|
shellmock_expect git --type exact --match "checkout foo"
|
|
|
|
shellmock_expect git --type exact --match "checkout foo --"
|
|
|
|
shellmock_expect git --type partial --match "add ."
|
|
|
|
shellmock_expect git --type partial --match "add ."
|
|
|
|
shellmock_expect git --type partial --match '-c'
|
|
|
|
shellmock_expect git --type partial --match '-c'
|
|
|
|
shellmock_expect git --type partial --match 'push --set-upstream origin'
|
|
|
|
shellmock_expect git --type partial --match 'push --set-upstream origin'
|
|
|
@@ -344,7 +378,7 @@ main() {
|
|
|
|
shellmock_verify
|
|
|
|
shellmock_verify
|
|
|
|
[ "${capture[0]}" = "git-stub status -s -- ." ]
|
|
|
|
[ "${capture[0]}" = "git-stub status -s -- ." ]
|
|
|
|
[ "${capture[1]}" = "git-stub fetch" ]
|
|
|
|
[ "${capture[1]}" = "git-stub fetch" ]
|
|
|
|
[ "${capture[2]}" = "git-stub checkout foo" ]
|
|
|
|
[ "${capture[2]}" = "git-stub checkout foo --" ]
|
|
|
|
[ "${capture[3]}" = "git-stub add ." ]
|
|
|
|
[ "${capture[3]}" = "git-stub add ." ]
|
|
|
|
[ "${capture[4]}" = "git-stub -c user.name=Test Suite -c user.email=test@github.com commit -m Commit Message --author=Test Suite <test@users.noreply.github.com>" ]
|
|
|
|
[ "${capture[4]}" = "git-stub -c user.name=Test Suite -c user.email=test@github.com commit -m Commit Message --author=Test Suite <test@users.noreply.github.com>" ]
|
|
|
|
[ "${capture[5]}" = "git-stub push --set-upstream origin HEAD:foo --tags" ]
|
|
|
|
[ "${capture[5]}" = "git-stub push --set-upstream origin HEAD:foo --tags" ]
|
|
|
@@ -359,7 +393,7 @@ main() {
|
|
|
|
|
|
|
|
|
|
|
|
shellmock_expect git --type partial --output " M new-file-1.txt M new-file-2.txt M new-file-3.txt" --match "status"
|
|
|
|
shellmock_expect git --type partial --output " M new-file-1.txt M new-file-2.txt M new-file-3.txt" --match "status"
|
|
|
|
shellmock_expect git --type exact --match "fetch"
|
|
|
|
shellmock_expect git --type exact --match "fetch"
|
|
|
|
shellmock_expect git --type exact --match "checkout"
|
|
|
|
shellmock_expect git --type exact --match "checkout --"
|
|
|
|
shellmock_expect git --type partial --match "add ."
|
|
|
|
shellmock_expect git --type partial --match "add ."
|
|
|
|
shellmock_expect git --type partial --match '-c'
|
|
|
|
shellmock_expect git --type partial --match '-c'
|
|
|
|
shellmock_expect git --type partial --match 'push origin'
|
|
|
|
shellmock_expect git --type partial --match 'push origin'
|
|
|
@@ -387,7 +421,7 @@ main() {
|
|
|
|
shellmock_verify
|
|
|
|
shellmock_verify
|
|
|
|
[ "${capture[0]}" = "git-stub status -s -- ." ]
|
|
|
|
[ "${capture[0]}" = "git-stub status -s -- ." ]
|
|
|
|
[ "${capture[1]}" = "git-stub fetch" ]
|
|
|
|
[ "${capture[1]}" = "git-stub fetch" ]
|
|
|
|
[ "${capture[2]}" = "git-stub checkout" ]
|
|
|
|
[ "${capture[2]}" = "git-stub checkout --" ]
|
|
|
|
[ "${capture[3]}" = "git-stub add ." ]
|
|
|
|
[ "${capture[3]}" = "git-stub add ." ]
|
|
|
|
[ "${capture[4]}" = "git-stub -c user.name=Test Suite -c user.email=test@github.com commit -m Commit Message --author=Test Suite <test@users.noreply.github.com>" ]
|
|
|
|
[ "${capture[4]}" = "git-stub -c user.name=Test Suite -c user.email=test@github.com commit -m Commit Message --author=Test Suite <test@users.noreply.github.com>" ]
|
|
|
|
[ "${capture[5]}" = "git-stub push origin" ]
|
|
|
|
[ "${capture[5]}" = "git-stub push origin" ]
|
|
|
@@ -402,7 +436,7 @@ main() {
|
|
|
|
|
|
|
|
|
|
|
|
shellmock_expect git --type partial --output " M new-file-1.txt M new-file-2.txt M new-file-3.txt" --match "status"
|
|
|
|
shellmock_expect git --type partial --output " M new-file-1.txt M new-file-2.txt M new-file-3.txt" --match "status"
|
|
|
|
shellmock_expect git --type exact --match "fetch"
|
|
|
|
shellmock_expect git --type exact --match "fetch"
|
|
|
|
shellmock_expect git --type exact --match "checkout"
|
|
|
|
shellmock_expect git --type exact --match "checkout --"
|
|
|
|
shellmock_expect git --type partial --match "add ."
|
|
|
|
shellmock_expect git --type partial --match "add ."
|
|
|
|
shellmock_expect git --type partial --match '-c'
|
|
|
|
shellmock_expect git --type partial --match '-c'
|
|
|
|
shellmock_expect git --type partial --match 'push origin'
|
|
|
|
shellmock_expect git --type partial --match 'push origin'
|
|
|
@@ -430,7 +464,7 @@ main() {
|
|
|
|
shellmock_verify
|
|
|
|
shellmock_verify
|
|
|
|
[ "${capture[0]}" = "git-stub status -s -- ." ]
|
|
|
|
[ "${capture[0]}" = "git-stub status -s -- ." ]
|
|
|
|
[ "${capture[1]}" = "git-stub fetch" ]
|
|
|
|
[ "${capture[1]}" = "git-stub fetch" ]
|
|
|
|
[ "${capture[2]}" = "git-stub checkout" ]
|
|
|
|
[ "${capture[2]}" = "git-stub checkout --" ]
|
|
|
|
[ "${capture[3]}" = "git-stub add ." ]
|
|
|
|
[ "${capture[3]}" = "git-stub add ." ]
|
|
|
|
[ "${capture[4]}" = "git-stub -c user.name=Test Suite -c user.email=test@github.com commit -m Commit Message --author=Test Suite <test@users.noreply.github.com>" ]
|
|
|
|
[ "${capture[4]}" = "git-stub -c user.name=Test Suite -c user.email=test@github.com commit -m Commit Message --author=Test Suite <test@users.noreply.github.com>" ]
|
|
|
|
[ "${capture[5]}" = "git-stub -c user.name=Test Suite -c user.email=test@github.com tag -a v2.0.0 -m v2.0.0" ]
|
|
|
|
[ "${capture[5]}" = "git-stub -c user.name=Test Suite -c user.email=test@github.com tag -a v2.0.0 -m v2.0.0" ]
|