Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All MRs that add unit tests conflict with each other #420

Closed
smcv opened this issue Apr 19, 2021 · 1 comment · Fixed by #602
Closed

All MRs that add unit tests conflict with each other #420

smcv opened this issue Apr 19, 2021 · 1 comment · Fixed by #602

Comments

@smcv
Copy link
Collaborator

smcv commented Apr 19, 2021

To reproduce:

  • Add a feature, write tests for it, and push a MR
  • Add another feature, write tests for it, and push a MR

Expected result: maintainers can review and merge several features in one go

Actual result: each new test has to change the line that prints 1..50, so they all conflict

We could perhaps make this better with code like this?

# in libtest-code.sh

test_number=0

ok () {
    test_number=$(( test_number + 1 )
    echo "ok $test_number - $*"
}

done_testing () {
    echo "1..$test_number"
}
# in the test

reticulate splines
ok "can reticulate splines"

ponder meaning of existence
ok "implements basic philosophy"

done_testing

with the TAP output ending up like this:

ok 1 - can reticulate splines
ok 2 - implements basic philosophy
1..2
@smcv
Copy link
Collaborator Author

smcv commented Apr 19, 2021

(This is the equivalent of ok and done_testing in Perl's Test module, which is where TAP comes from.)

quag added a commit to quag/bubblewrap that referenced this issue Oct 1, 2023
quag added a commit to quag/bubblewrap that referenced this issue Oct 1, 2023
@smcv smcv closed this as completed in #602 Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant