Skip to content

Commit

Permalink
Add failing test from metrics-rs#289
Browse files Browse the repository at this point in the history
  • Loading branch information
gnuvince committed Mar 18, 2022
1 parent a7153f6 commit cc2c289
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion metrics-exporter-prometheus/src/formatting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,13 @@ mod tests {

#[test]
fn test_sanitize_metric_name_known_cases() {
let cases = &[("*", "_"), ("\"", "_"), ("foo_bar", "foo_bar"), ("1foobar", "_foobar")];
let cases = &[
("*", "_"),
("\"", "_"),
("foo_bar", "foo_bar"),
("foo1_bar", "foo1_bar"),
("1foobar", "_foobar"),
];

for (input, expected) in cases {
let result = sanitize_metric_name(input);
Expand Down

0 comments on commit cc2c289

Please sign in to comment.