blob: 53cf5c26c734f4a39be86fd22541e28cdf7d4f79 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
(* the legacy parser ignores flags on formatters on which they make no
sense *)
let () = Printf.printf "%+s\n" "toto"
;;
let () = Printf.printf "%#s\n" "toto"
;;
let () = Printf.printf "% s\n" "toto"
;;
let () = Printf.printf "%03s\n" "toto"
;;
let () = Printf.printf "%03S\n" "toto"
;;
let () = Printf.printf "%.3s\n" "toto"
;;
(* it still fails on flags used with ignored formats (%_d, etc.),
but it's unclear how to test that in a backward-compatible way,
if we accept that the error message may have changed
*)
|