pike.git/
src/
testsuite.in
Branch:
Tag:
Non-build tags
All tags
No tags
1999-06-17
1999-06-17 20:33:06 by Fredrik Noring <noring@nocrew.org>
02d40d7195690b32c2a2995f3066e42a37f22e50 (
12
lines) (+
11
/-
1
)
[
Show
|
Annotate
]
Branch:
7.9
Testing some cases for sprintf.
Rev: src/testsuite.in:1.176
1:
-
stest_true([["$Id: testsuite.in,v 1.
175
1999/06/
15
18
:
54
:
35
mirar
Exp $"]])
+
stest_true([["$Id: testsuite.in,v 1.
176
1999/06/
17
20
:
33
:
06
noring
Exp $"]])
cond([[all_constants()->_verify_internals]], [[ test_do(_verify_internals())
2961:
test_search4("kapit\3333333l>")
+
// - sprintf
+
test_eq(sprintf("%.1f",31415.9267),"31415.9")
+
test_eq(sprintf("%.0f",31415.9267),"31416")
+
test_eq(sprintf("%.-1f",31415.9267),"31420")
+
test_eq(sprintf("%.-2f",31415.9267),"31400")
+
test_eq(sprintf("%.-2f",-31415.9267),"-31400")
+
test_eq(sprintf("%.-10f",31415.9267),"0")
+
test_eq(sprintf("%20.-3f", 31415.92670)," 31000")
+
// - sizeof test_eq(sizeof("felbar"),6) test_eq(sizeof(({"fulbar","gazonk",7})),3)