summaryrefslogtreecommitdiff
path: root/testsuite/tests/warnings/deprecated_warning_specs.ml
blob: 903b4757c4cb137d7acc5fb8608915fe25134c17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
(* TEST
 expect;
*)

(** Deprecated sequences of unsigned letters *)

[@@@warning "fragile-math"]
[%%expect {|
Line 3, characters 0-27:
3 | [@@@warning "fragile-math"]
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Alert ocaml_deprecated_cli: Setting a warning with a sequence of lowercase or uppercase letters,
like 'ath', is deprecated.
Use the equivalent signed form: -f-r-a-g-i-l-e-m-a-t-h.
Hint: Enabling or disabling a warning by its mnemonic name requires a + or - prefix.
Hint: Did you make a spelling mistake when using a mnemonic name?
|}]

[@@@warning "ab-cdg+efh"]
[%%expect {|
Line 1, characters 0-25:
1 | [@@@warning "ab-cdg+efh"]
    ^^^^^^^^^^^^^^^^^^^^^^^^^
Alert ocaml_deprecated_cli: Setting a warning with a sequence of lowercase or uppercase letters,
like 'fh', is deprecated.
Use the equivalent signed form: -a-b-c-d-g+e-f-h.
Hint: Enabling or disabling a warning by its mnemonic name requires a + or - prefix.
|}]


(** -w "a+10..." and -w "A-10..." are still supported *)
[@@@warning "a+1..20+50"]
[%%expect {|
|}]

[@@@warning "A-3..14-56"]
[%%expect {|
|}]