Skip to content

Commit

Permalink
Add test (issue 3005)
Browse files Browse the repository at this point in the history
  • Loading branch information
nrc committed Oct 15, 2018
1 parent e29fd7b commit e2be62c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/source/match.rs
Original file line number Diff line number Diff line change
Expand Up @@ -536,3 +536,16 @@ fn issue_3030() {
}
}
}

fn issue_3005() {
match *token {
Token::Dimension {
value, ref unit, ..
} if num_context.is_ok(context.parsing_mode, value) =>
{
return NoCalcLength::parse_dimension(context, value, unit)
.map(LengthOrPercentage::Length)
.map_err(|()| location.new_unexpected_token_error(token.clone()))
},
}
}
12 changes: 12 additions & 0 deletions tests/target/match.rs
Original file line number Diff line number Diff line change
Expand Up @@ -564,3 +564,15 @@ fn issue_3030() {
) => {}
}
}

fn issue_3005() {
match *token {
Token::Dimension {
value, ref unit, ..
} if num_context.is_ok(context.parsing_mode, value) => {
return NoCalcLength::parse_dimension(context, value, unit)
.map(LengthOrPercentage::Length)
.map_err(|()| location.new_unexpected_token_error(token.clone()))
}
}
}

0 comments on commit e2be62c

Please sign in to comment.