test: printf: Add a test for scientific printing of negative number

This was broken before the last few commits.
This commit is contained in:
Nicolas Boichat
2025-03-14 12:42:00 +01:00
parent 92a291b71d
commit 0c0d119413
+8
View File
@@ -380,6 +380,14 @@ fn sub_num_dec_trunc() {
.stdout_only("pi is ~ 3.14159");
}
#[test]
fn sub_num_sci_negative() {
new_ucmd!()
.args(&["-1234 is %e", "-1234"])
.succeeds()
.stdout_only("-1234 is -1.234000e+03");
}
#[cfg_attr(not(feature = "test_unimplemented"), ignore)]
#[test]
fn sub_num_hex_float_lower() {