summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/tokenize.rs9
-rw-r--r--tests/test_html5lib.rs2
2 files changed, 10 insertions, 1 deletions
diff --git a/examples/tokenize.rs b/examples/tokenize.rs
new file mode 100644
index 0000000..9a039c3
--- /dev/null
+++ b/examples/tokenize.rs
@@ -0,0 +1,9 @@
+//! Let's you easily try out the tokenizer with e.g.
+//! printf '<h1>Hello world!</h1>' | cargo run --example=tokenize
+use html5gum::{BufReadReader, Tokenizer};
+
+fn main() {
+ for token in Tokenizer::new(BufReadReader::new(std::io::stdin().lock())).flatten() {
+ println!("{:?}", token);
+ }
+}
diff --git a/tests/test_html5lib.rs b/tests/test_html5lib.rs
index 540388f..652a72d 100644
--- a/tests/test_html5lib.rs
+++ b/tests/test_html5lib.rs
@@ -5,7 +5,7 @@ use std::{collections::BTreeMap, fs::File, io::BufReader, path::Path};
#[cfg(not(feature = "integration-tests"))]
compile_error!(
- "integration tests need the integration-tests feature enabled. Run cargo tests --all-features"
+ "integration tests need the integration-tests feature enabled. Run cargo test --all-features"
);
struct ExpectedOutputTokens(Vec<Token>);