mirror of
https://github.com/storytold/gridcraft.git
synced 2026-11-28 17:30:24 +01:00
Recently Used: a sign before a space starts a formula too
main's `functions_in_formula` test expected `- SUM(1)` not to be a formula. With #2023's rule, which `is_formula_input` now uses, it is one, as Excel for the web enters `- remember this` as `=- remember this`.
This commit is contained in:
1 parent
0622859f49
commit
2829120d4d
1 file changed
+3
-1
@@ -154,7 +154,9 @@ mod tests {
|
||||
assert_eq!(functions_in_formula("+SUM(1)"), ["SUM"]);
|
||||
assert_eq!(functions_in_formula("-ABS(A1)"), ["ABS"]);
|
||||
assert!(functions_in_formula("-5").is_empty() && functions_in_formula("+1e3").is_empty(), "numbers");
|
||||
assert!(functions_in_formula("+").is_empty() && functions_in_formula("- SUM(1)").is_empty(), "not formulas");
|
||||
assert!(functions_in_formula("+").is_empty() && functions_in_formula("--").is_empty(), "not formulas");
|
||||
// A sign before a space still starts a formula, as Excel takes `- SUM(1)` (#2023).
|
||||
assert_eq!(functions_in_formula("- SUM(1)"), ["SUM"]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in new issue
Block a user