summaryrefslogtreecommitdiff
path: root/testsuite/tests/lib/Text.Printf/1548.hs
blob: 68cec0548fafd670c62fec7ef7c3b2f83f932dd3 (plain)
1
2
3
4
5
6
7
8
9
10
11
import Text.Printf

main = do
   printf "%.*f\n" (2::Int) ((1/3) :: Double)
   -- (expected: "0.33")

   printf "%.3s\n" "foobar"
   -- (expected: "foo")

   printf "%10.5d\n" (4::Int)
   -- (expected: "     00004")