test(smart-select): give each half of the angle-bracket rule a line to refuse

`<` only pairs when neither end is padded — a generic or a tag, not a
comparison. Every negative fixture put a space on both sides, so either half
of that rule threw them all out and neither half was ever the one deciding.
Dropping the opening check left the whole suite green while `if a < b, x>y`
started selecting `< b, x>` on a click, and dropping the closing check did
the same for `echo <a >b`.

Two lines with a space on one side only, so each half has a case that is
its alone.
This commit is contained in:
l0ng-ai
2026-08-24 00:43:55 +08:00
parent 553042b7c3
commit f27dce6838
+6
View File
@@ -883,6 +883,12 @@ mod tests {
"awk '{ if ($1 > 100 && $2 < 5) print }'",
"WHERE a < 10 AND b > 20",
"empty <> pair",
// Both of the above put a space on each side, so either half of
// the rule alone throws them out and neither half is ever the one
// being asked. These two put a space on one side only, so each
// half has a line that only it can refuse.
"if a < b, x>y",
"echo <a >b",
] {
let chars: Vec<char> = text.chars().collect();
for (i, &c) in chars.iter().enumerate() {