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

fix bug in spawn test's usage of search #14123

Merged
merged 1 commit into from
Nov 28, 2015
Merged

fix bug in spawn test's usage of search #14123

merged 1 commit into from
Nov 28, 2015

Conversation

tkelman
Copy link
Contributor

@tkelman tkelman commented Nov 24, 2015

searching for a substring returns a range, not a tuple, so these could never fail

searching for a substring returns a range, not a tuple, so these could never fail
@tkelman tkelman added test This change adds or pertains to unit tests backport pending 0.4 labels Nov 24, 2015
@test search(out,"world") != (0,0)
@test search(out,"hello") != (0,0)
@test search(out,"world") != 0:-1
@test search(out,"hello") != 0:-1
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i often want to try to add an inverse test like @test search(out, "fail") == 0:-1 to help catch these sorts of errors. it's not often easy to write though.

tkelman added a commit that referenced this pull request Nov 28, 2015
fix bug in spawn test's usage of search
@tkelman tkelman merged commit 4d0b1ac into master Nov 28, 2015
@tkelman tkelman deleted the tk/spawntest branch November 28, 2015 15:06
tkelman added a commit that referenced this pull request Nov 30, 2015
searching for a substring returns a range, not a tuple, so these could never fail
(cherry picked from commit 1080edb)
ref #14123
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test This change adds or pertains to unit tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants