Emit more detailed highlighting for %, >>, <<

This commit is contained in:
Luna Razzaghipour 2022-03-07 20:16:03 +11:00
parent 5fae65dd28
commit 6da1228898
No known key found for this signature in database
GPG key ID: 1A3A9C4A5CDB108B
3 changed files with 85 additions and 4 deletions

View file

@ -841,6 +841,30 @@ fn foo() {
);
}
#[test]
fn test_operators() {
check_highlighting(
r##"
fn main() {
1 + 1 - 1 * 1 / 1 % 1 | 1 & 1 ! 1 ^ 1 >> 1 << 1;
let mut a = 0;
a += 1;
a -= 1;
a *= 1;
a /= 1;
a %= 1;
a |= 1;
a &= 1;
a ^= 1;
a >>= 1;
a <<= 1;
}
"##,
expect_file!["./test_data/highlight_operators.html"],
false,
);
}
#[test]
fn test_rainbow_highlighting() {
check_highlighting(