test: add real world example

this is what failed before the last fix;
it was formatted to "0.-125"
This commit is contained in:
electria 2026-11-18 19:24:59 -08:00
commit 140ce061a3
Signed by: electria
SSH key fingerprint: SHA256:8LlB3ucPbBHqozqkhsNbaV5oG3SlzzqUj8FZDL6IPQs

View file

@ -208,6 +208,11 @@ mod tests {
assert_pretty_eval!("10901");
}
#[test]
fn formatting_minus() {
assert_pretty_eval!("1/(2^3 * (-1)^(2 - 1))", "-0.125");
}
#[test]
fn basic_get_significant_digits() {
let many_zeros = eval("14.00643 + 1.00784 * 4 + 35.446 + 15.9994 * 4");