diff options
author | Sven-Hendrik Haase <svenstaro@gmail.com> | 2022-09-20 00:27:39 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-20 00:27:39 +0000 |
commit | 7a808e697b1ea50361dd06029f6b6d4f8eaea644 (patch) | |
tree | fd31b5daf593a094df6438597b1fe5a284e81870 /tests | |
parent | Merge pull request #906 from svenstaro/dependabot/cargo/fast_qr-0.5.1 (diff) | |
parent | Add support for README.txt and README files (diff) | |
download | miniserve-7a808e697b1ea50361dd06029f6b6d4f8eaea644.tar.gz miniserve-7a808e697b1ea50361dd06029f6b6d4f8eaea644.zip |
Merge pull request #911 from Atreyagaurav/master
Add support for README.txt and README files
Diffstat (limited to 'tests')
-rw-r--r-- | tests/readme.rs | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/tests/readme.rs b/tests/readme.rs index 56a3afd..3fcbe29 100644 --- a/tests/readme.rs +++ b/tests/readme.rs @@ -64,7 +64,11 @@ fn show_root_readme_contents( case("readme.md"), case("README.md"), case("README.MD"), - case("ReAdMe.Md") + case("ReAdMe.Md"), + case("Readme.txt"), + case("README.txt"), + case("README"), + case("ReAdMe") )] fn show_nested_readme_contents( #[with(&["--readme"])] server: TestServer, @@ -113,13 +117,11 @@ fn assert_readme_contents(parsed_dom: &Document, filename: &str) { .find(Attr("id", "readme-contents")) .next() .is_some()); - assert!( - parsed_dom - .find(Attr("id", "readme-contents")) - .next() - .unwrap() - .text() - .trim() - == format!("Contents of {}", filename) - ); + assert!(parsed_dom + .find(Attr("id", "readme-contents")) + .next() + .unwrap() + .text() + .trim() + .contains(&format!("Contents of {}", filename))); } |