()
| 781 | |
| 782 | #[test] |
| 783 | fn test_json_script() { |
| 784 | use crate::paragraph::ParagraphHasher; |
| 785 | |
| 786 | let doc = Document::new(Path::new("/"), Path::new("/html5gum/struct.Tokenizer.html")); |
| 787 | |
| 788 | let html = r#"<script type="text/json" id="notable-traits-data">{"InfallibleTokenizer<R, E>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.InfallibleTokenizer.html\" title=\"struct html5gum::InfallibleTokenizer\">InfallibleTokenizer</a><R, E></code></h3><pre><code><div class=\"where\">impl<R: <a class=\"trait\" href=\"trait.Reader.html\" title=\"trait html5gum::Reader\">Reader</a><Error = <a class=\"enum\" href=\"https://doc.rust-lang.org/1.82.0/core/convert/enum.Infallible.html\" title=\"enum core::convert::Infallible\">Infallible</a>>, E: <a class=\"trait\" href=\"emitters/trait.Emitter.html\" title=\"trait html5gum::emitters::Emitter\">Emitter</a>> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.82.0/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\">Iterator</a> for <a class=\"struct\" href=\"struct.InfallibleTokenizer.html\" title=\"struct html5gum::InfallibleTokenizer\">InfallibleTokenizer</a><R, E></div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/1.82.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item\" class=\"associatedtype\">Item</a> = E::<a class=\"associatedtype\" href=\"emitters/trait.Emitter.html#associatedtype.Token\" title=\"type html5gum::emitters::Emitter::Token\">Token</a>;</div>"}</script>"#; |
| 789 | |
| 790 | let mut doc_buf = DocumentBuffers::default(); |
| 791 | |
| 792 | let mut links = Vec::new(); |
| 793 | doc.links_from_read::<_, ParagraphHasher, _>(&mut doc_buf, html.as_bytes(), false, |link| { |
| 794 | links.push(link) |
| 795 | }) |
| 796 | .unwrap(); |
| 797 | |
| 798 | assert_eq!(links, &[]); |
| 799 | } |
| 800 | |
| 801 | #[test] |
| 802 | fn test_redirects_dynamic_placeholders() { |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…