Skip to content

Commit

Permalink
[Outreachy][Patch v2] t3404: avoid losing exit status to pipes
Browse files Browse the repository at this point in the history
Changes since v1:
- Added "tr -d '[:space:]'" to handle whitespace on macOS

Signed-off-by: Usman Akinyemi <[email protected]>
  • Loading branch information
Unique-Usman committed Oct 6, 2024
1 parent 5dd96ea commit 4199434
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions t/t3404-rebase-interactive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ test_expect_success 'multi-squash only fires up editor once' '
) &&
test $base = $(git rev-parse HEAD^) &&
git show >output &&
count=$(grep ONCE output | wc -l) &&
count=$(grep ONCE output | wc -l | tr -d '[:space:]') &&
test 1 = "$count"
'

Expand All @@ -416,7 +416,7 @@ test_expect_success 'multi-fixup does not fire up editor' '
) &&
test $base = $(git rev-parse HEAD^) &&
git show >output &&
count=$(grep NEVER output | wc -l) &&
count=$(grep NEVER output | wc -l | tr -d '[:space:]') &&
test 0 = "$count" &&
git checkout @{-1} &&
git branch -D multi-fixup
Expand All @@ -436,7 +436,7 @@ test_expect_success 'commit message used after conflict' '
) &&
test $base = $(git rev-parse HEAD^) &&
git show >output &&
count=$(grep ONCE output | wc -l) &&
count=$(grep ONCE output | wc -l | tr -d '[:space:]') &&
test 1 = "$count" &&
git checkout @{-1} &&
git branch -D conflict-fixup
Expand All @@ -456,7 +456,7 @@ test_expect_success 'commit message retained after conflict' '
) &&
test $base = $(git rev-parse HEAD^) &&
git show >output &&
count=$(grep TWICE output | wc -l) &&
count=$(grep TWICE output | wc -l | tr -d '[:space:]') &&
test 2 = "$count" &&
git checkout @{-1} &&
git branch -D conflict-squash
Expand Down Expand Up @@ -501,7 +501,7 @@ test_expect_success 'squash ignores comments' '
) &&
test $base = $(git rev-parse HEAD^) &&
git show >output &&
count=$(grep ONCE output | wc -l) &&
count=$(grep ONCE output | wc -l | tr -d '[:space:]') &&
test 1 = "$count" &&
git checkout @{-1} &&
git branch -D skip-comments
Expand All @@ -519,7 +519,7 @@ test_expect_success 'squash ignores blank lines' '
) &&
test $base = $(git rev-parse HEAD^) &&
git show >output &&
count=$(grep ONCE output | wc -l) &&
count=$(grep ONCE output | wc -l | tr -d '[:space:]') &&
test 1 = "$count" &&
git checkout @{-1} &&
git branch -D skip-blank-lines
Expand Down

0 comments on commit 4199434

Please sign in to comment.