- I have searched open and closed issues and pull requests for duplicates, using these search terms:
- I have checked the latest
main branch to see if this has already been fixed, in these files:
- src/ch12-04-testing-the-librarys-functionality.md
- listings/ch12-an-io-project/listing-12-15/src/lib.rs
URL to the section(s) of the book with this problem: https://doc.rust-lang.org/book/ch12-04-testing-the-librarys-functionality.html
Description of the problem:
There are several mismatches. First of all, the test uses the content string:
Rust:
safe, fast, productive.
Pick three.
But the query is duct. Second, the heading says "Creating a failing test", but the test is a regular one, and the book even says:
This test searches for the string `"duct"`. The text we’re searching is three
lines, only one of which contains `"duct"`
Which is obviously wrong. Last, later on in the same chapter, it shows the test working fine, which isn't the case for me.
Suggested fix: Change the query to something else, like "fast"
mainbranch to see if this has already been fixed, in these files:URL to the section(s) of the book with this problem: https://doc.rust-lang.org/book/ch12-04-testing-the-librarys-functionality.html
Description of the problem:
There are several mismatches. First of all, the test uses the content string:
But the query is
duct. Second, the heading says "Creating a failing test", but the test is a regular one, and the book even says:Which is obviously wrong. Last, later on in the same chapter, it shows the test working fine, which isn't the case for me.
Suggested fix: Change the query to something else, like "fast"