Skip to content

Commit

Permalink
chore: print versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Aloso committed Nov 28, 2024
1 parent c57c23d commit 12ad897
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pomsky-lib/tests/it/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ fn defer_main() {
let rt = RegexTest::default();
rt.init_processes();
println!("test setup completed in {:.2?}", start.elapsed());
println!(" - PCRE2 version: {}", regex_test::pcre_version());
println!(" - Oniguruma version: {}", regex_test::onig_version());

println!();
let start = Instant::now();
Expand Down
1 change: 1 addition & 0 deletions regex-test/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ pub enum Outcome {
Error(String),
}

pub use native::{onig_version, pcre_version};
pub use sync::RegexTest;
9 changes: 9 additions & 0 deletions regex-test/src/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,12 @@ pub(crate) fn ruby(regex: &str, test_strings: &[impl AsRef<str>]) -> Outcome {
Err(e) => Outcome::Error(e.to_string()),
}
}

pub fn pcre_version() -> String {
let (major, minor) = pcre2::version();
format!("{major}.{minor}")
}

pub fn onig_version() -> String {
onig::version()
}

0 comments on commit 12ad897

Please sign in to comment.