Expand description
Test fixtures and helpers shared across ecosystem crates.
Test fixtures throughout the workspace write absolute paths in Unix
style (e.g. /project/Cargo.toml) for readability. Uri::from_file_path
requires a platform-absolute path, and a Unix-style path is not
recognized as absolute on Windows (no drive letter), so calling it
directly with such a literal panics on Windows only. test_uri
normalizes the path per host platform before constructing the [Uri].
assert_dot_segment_gated_or_contained/assert_dot_segment_gated_or_contained_transformed
guard the recurring dot-segment / unvalidated-URL-sink defect class (#337, #341, #349,
#357, #361, #365, #371) against further recurrence.
capture_tracing_output/capture_tracing_output_async let a test assert a
tracing call actually fired (originally added standalone in deps-swift for #357,
then duplicated per-crate for #380/#378’s warn_rejected_value coverage before being
consolidated here).
Constants§
- ADVERSARIAL_
URL_ SEGMENTS - Canonical adversarial identifier values for the recurring dot-segment / unvalidated-URL-sink defect class (#337, #341, #349, #357, #361).
Functions§
- assert_
dot_ segment_ gated_ or_ contained - Exercises one ecosystem’s identifier-to-URL sink against every
ADVERSARIAL_URL_SEGMENTSentry. - assert_
dot_ segment_ gated_ or_ contained_ transformed - As
assert_dot_segment_gated_or_contained, but for aresolvewhose production gate legitimately transforms the identifier before it reaches the URL builder. - capture_
tracing_ output - Captures
tracingoutput emitted synchronously duringfinto aString. - capture_
tracing_ output_ async - Async counterpart of
capture_tracing_output, for atracingemission inside anasync fn/.awaited future. - capture_
tracing_ output_ at - Like
capture_tracing_output, but capturing every level up to and includingmax_level(e.g.tracing::Level::DEBUG). - test_
uri - Builds a [
Uri] from a Unix-style absolute test path.