heroku / libcnb.rs

A framework for writing Cloud Native Buildpacks in Rust
BSD 3-Clause "New" or "Revised" License
35 stars 6 forks source link

Test helpers to match against regular expressions. #813

Closed colincasey closed 4 months ago

colincasey commented 6 months ago

Extracted these from https://github.com/heroku/buildpacks-apt/pull/8 which uses these macros to test for output that cannot be done reliably using just assert_contains and assert_not_contains because of the presence of random variations like the names of temporary test folders.

Malax commented 6 months ago

@colincasey can you get CI passing? I gave it a quick skim and it looked fine otherwise. I'll give it a quick review as soon as CI is fixed. Can you ping me as soon as that is done? :)

colincasey commented 6 months ago

@Malax yep, forgot to check a doc test and had accidentally applied a #[cfg(test)] to the unused dependency the linter was complaining about.