mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-08 01:05:47 +00:00
lighthouse_version: Fix version string regex (#3451)
## Issue Addressed N/A ## Proposed Changes If the build tree is not a git repository, the unit test will fail. This PR fixes the issue. ## Additional Info N/A
This commit is contained in:
@@ -37,7 +37,8 @@ mod test {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn version_formatting() {
|
fn version_formatting() {
|
||||||
let re = Regex::new(r"^Lighthouse/v[0-9]+\.[0-9]+\.[0-9]+(-rc.[0-9])?-[[:xdigit:]]{7}\+?$")
|
let re =
|
||||||
|
Regex::new(r"^Lighthouse/v[0-9]+\.[0-9]+\.[0-9]+(-rc.[0-9])?(-[[:xdigit:]]{7})?\+?$")
|
||||||
.unwrap();
|
.unwrap();
|
||||||
assert!(
|
assert!(
|
||||||
re.is_match(VERSION),
|
re.is_match(VERSION),
|
||||||
|
|||||||
Reference in New Issue
Block a user