aboutsummaryrefslogtreecommitdiff
path: root/integration_tests/Cargo.toml
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2023-08-11 19:37:09 +0200
committerMartin Fischer <martin@push-f.com>2023-08-19 06:39:08 +0200
commitb48e5c3b99fd537d223cb899e8675177d77e650c (patch)
treed614c5c0950f75d677fb5e9e351c19a30d140257 /integration_tests/Cargo.toml
parent900c12ee92ee9dfff7e2c52770ba17a0c51f837f (diff)
refactor: move html5lib test to own crate to fix `cargo test`
Previously `cargo test` failed because it ran the test_html5lib integration test, which depends on the integration-tests feature (so you always had to run `cargo test` with `--features integration-tests` or `--all-features`, which was annoying). This commit moves the integration tests to another crate, so that the dependency on the feature can be properly defined in a way so that `cargo test` just works and runs the test.
Diffstat (limited to 'integration_tests/Cargo.toml')
-rw-r--r--integration_tests/Cargo.toml22
1 files changed, 22 insertions, 0 deletions
diff --git a/integration_tests/Cargo.toml b/integration_tests/Cargo.toml
new file mode 100644
index 0000000..1e68a0b
--- /dev/null
+++ b/integration_tests/Cargo.toml
@@ -0,0 +1,22 @@
+# The html5lib integration test lives in a separate crate because
+# we want `cargo test` to run these tests despite their dependency
+# on the `integration-tests` feature from the html5tokenizer crate
+# and cargo doesn't support features to be automatically enabled for
+# integration tests in a single crate. (required-features under [[test]]
+# just results in the test being skipped if the feature isn't enabled).
+# See https://github.com/rust-lang/cargo/issues/2911#issuecomment-524652568.
+
+[package]
+name = "integration_tests"
+publish = false
+version = "0.0.0"
+edition = "2021"
+
+# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+
+[dev-dependencies]
+glob = "0.3.1"
+html5tokenizer = { path = "..", features = ["integration-tests"] }
+pretty_assertions = "1.0.0"
+serde = { version = "1.0.130", features = ["derive"] }
+serde_json = "1.0.71"