The unpac monorepo manager self-hosting as a monorepo using unpac
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Handle CRLF in the mnemonics.mll test

mnemonics.mll opens the channel in text mode, which on Windows
automatically transforms the line-endings. Tweak the test so that the
behaviour is uniform on both Unix and Windows.

+9 -5
+9 -5
testsuite/tests/warnings/mnemonics.mll
··· 6 6 } 7 7 8 8 let ws = [' ''\t'] 9 - let eol = '\n' 9 + let eol = '\r'? '\n' 10 10 let to_eol = [^'\n']* eol 11 11 let constr = ['A'-'Z']['a'-'z''A'-'Z''0'-'9''_']* 12 12 let int = ['0'-'9']+ ··· 38 38 let ocamlrun = Sys.getenv "ocamlrun" 39 39 40 40 let constructors = 41 - let ic = open_in Filename.(concat ocamlsrcdir (concat "utils" "warnings.ml")) in 41 + let ic = 42 + open_in_bin Filename.(concat ocamlsrcdir (concat "utils" "warnings.ml")) 43 + in 42 44 Fun.protect ~finally:(fun () -> close_in_noerr ic) 43 45 (fun () -> 44 46 let lexbuf = Lexing.from_channel ic in ··· 54 56 ocamlrun [concat ocamlsrcdir "ocamlc"; "-warn-help"]) 55 57 in 56 58 assert (n = 0); 57 - let ic = open_in stdout in 59 + let ic = open_in_bin stdout in 58 60 Fun.protect ~finally:(fun () -> close_in_noerr ic) 59 61 (fun () -> 60 62 let lexbuf = Lexing.from_channel ic in ··· 75 77 | true, false -> () 76 78 | false, true -> () 77 79 | false, false -> 78 - Printf.printf "Could not find constructor corresponding to mnemonic %S (%d)\n%!" s n 80 + Printf.printf 81 + "Could not find constructor corresponding to mnemonic %S (%d)\n%!" s n 79 82 | true, true -> 80 - Printf.printf "Found constructor for deprecated warnings %S (%d)\n%!" s n 83 + Printf.printf 84 + "Found constructor for deprecated warnings %S (%d)\n%!" s n 81 85 ) mnemonics 82 86 83 87 let _ =