mirror of
https://github.com/l0ng-ai/tty7.git
synced 2026-09-21 16:02:20 +00:00
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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user