Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit e2be62c

Browse files
committed
Add test (issue 3005)
1 parent e29fd7b commit e2be62c

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

tests/source/match.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,3 +536,16 @@ fn issue_3030() {
536536
}
537537
}
538538
}
539+
540+
fn issue_3005() {
541+
match *token {
542+
Token::Dimension {
543+
value, ref unit, ..
544+
} if num_context.is_ok(context.parsing_mode, value) =>
545+
{
546+
return NoCalcLength::parse_dimension(context, value, unit)
547+
.map(LengthOrPercentage::Length)
548+
.map_err(|()| location.new_unexpected_token_error(token.clone()))
549+
},
550+
}
551+
}

tests/target/match.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,3 +564,15 @@ fn issue_3030() {
564564
) => {}
565565
}
566566
}
567+
568+
fn issue_3005() {
569+
match *token {
570+
Token::Dimension {
571+
value, ref unit, ..
572+
} if num_context.is_ok(context.parsing_mode, value) => {
573+
return NoCalcLength::parse_dimension(context, value, unit)
574+
.map(LengthOrPercentage::Length)
575+
.map_err(|()| location.new_unexpected_token_error(token.clone()))
576+
}
577+
}
578+
}

0 commit comments

Comments
 (0)